How to check the level of the dsc pin through the register of the pin, for example, a pin of dsc 56f84763

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to check the level of the dsc pin through the register of the pin, for example, a pin of dsc 56f84763

1,064 Views
2048981391
Contributor I

I am writing a BLDC control program, in codewarrior11, this BLDC has a Hall sensor and the control chip is dsc 56f84763. I use the capture module to capture the hall pin (GPIOC8) for speed measurement, and the bitIO module to determine the level of the hall pin. There is a conflict between the capture module and the bitIO module. How can I solve this problem?Or give me a demo.

1.PNG2.PNG

0 Kudos
Reply
3 Replies

990 Views
Ben
Senior Contributor I

Hello fei,

How about bridging the hall signal to another simple Input pin. One pin will handle the capture feature, and the other will detect hall level change...

Ben

0 Kudos
Reply

990 Views
2048981391
Contributor I

thank you very much!

Another method is to read the register of the pin. But I don't know how to view the registers? can you help me?

0 Kudos
Reply

990 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Fei,

Regarding your Hall sensor connection, I recommend you connect 3 Hall signal to the QuadTimer input pins, if you use quadTimerA, you have to connect the three Hall signals to TA0/TA1/TA2/TA3, in other words, three out of four quadTimer pins. You can set both rising/falling edge to trigger capture ISR, in the ISR, you can read the INPUT bit(bit 8) of TMRx_nSCTRL to get the hall signal logic. The INPUT bit reflects the current state of the pad.

There are two methods to route the capture signal to quadTimer input pin, which is selected by the  Secondary Count Source bits(bit 8~7) in TMRx_nCTRL. The first one is to connect the Hall signal to quadTimer input pins directly for example TA0/TA1/TA2, you can set the SCS bits to select the pins. The second method is to connect the hall signal to XB_INx for example XB_IN2/XB_IN3/XB_IN4, you can use crossbar to route the signal to either quadTimerA input pin to quadTimerB input pins, but only one not both.

We do not recommend that user connect the 3 hall signals to GPIO pins.

Hope it can help you

BR

Xiangjun rong

1)quadTimer input pins:

pastedImage_1.png

2)Crossbar signal routing diagram:

pastedImage_2.png

0 Kudos
Reply