Regarding PTU trigger list update in Hall Sensor Sample Code

显示  仅  | 搜索替代 

Regarding PTU trigger list update in Hall Sensor Sample Code

602 次查看
Contributor V

Hi All,

With reference to the MC9S12ZVML128_BLDC_Hall sensored sample code , I have a few queries.

From the sample code, my understanding is that a single physical list is being used in the code.

14.4.3 Reload mechanism from RM , states that 

"Each trigger generator uses two lists to load the trigger values from the memory. One list can be updated
by the CPU while the other list is used to generate the trigger events. After enabling, the TG uses the lists
in alternate order. When the update of alternate trigger list is done, the SW must set the PTULDOK bit.

In this case the trigger generator is using only one physical list of trigger events even if the trigger generator logic is switching between both pointers. The SW must make sure, that  the CPU does not update the trigger list before the execution of the trigger list is done."

Queries :

1. From the code, the trigger list is getting updated at every 1msec. [UpdateDutyCycle]

 - Can you please tell the reason for the update in 1msec.? what is the reason for asynchronous update of trigger list in the sample code.


2. From the above excerpt , it states software should ensure CPU doesnot update trigger list before execution of trigger list is done.

- So single physical list is being used, but SW does not verify if the list has completed execution before updating it

- So i would like to know how does it work fine, even if it does not obey the above requirement as per RM.

Thak you.

标签 (1)
标记 (2)
0 项奖励
0 回复数