cancel
Showing results for 
Search instead for 
Did you mean: 

How is the st25r3916EnableInterrupts , st25r3916DisableInterrupts and st25r3916ExecuteCommand function work ?

hChan.11
Associate II

I am new beginner in stm32 and I am now working to work with my customer board with st25r3917b and I am now starting with the self test. I have checked that the st25r3916DisableInterrupts and st25r3916EnableInterrupts.Sometime it doesn't mask the register correctly. For example ,in the ST25R3916B test ,it is going to do trigger RC calibration by executing the command 0xEAU and inside the st25r3916ExecuteCommandAndGetResult it is supposed to enable ST25R3916_IRQ_MASK_DCT by masking the Mask timer and NFC interrupt register to 0x80 but I read the Mask timer and NFC interrupt register after st25r3916EnableInterrupts( ST25R3916_IRQ_MASK_DCT ) and it doesn't mask the Mask timer and NFC interrupt register correctly .May I ask how to solve this problem? Beside, I want to know the st25r3916DisableInterrupts () function will mask the register back to 0 according to the interrupt type ? Thanks alot.

Best regards,

Chan

1 ACCEPTED SOLUTION

Accepted Solutions
Ulysses HERNIOSUS
ST Employee

Hi hChan.1,

The bits inside interrupt mask registers in ST25R3916(B) have the following meaning:

  • 1 means interrupt is disabled, no reaction on INT pin when the corresponding I_* bit goes high.
  • 0 means interrupt is enabled, if the corresponding I_* bit goes high also the INT pin will go high.

So for the mentioned example: When wanting to wait for ST25R3916_IRQ_MASK_DCT, it will clear the mask bit.

Regards, Ulysses

View solution in original post

4 REPLIES 4
Ulysses HERNIOSUS
ST Employee

Hi hChan.1,

The bits inside interrupt mask registers in ST25R3916(B) have the following meaning:

  • 1 means interrupt is disabled, no reaction on INT pin when the corresponding I_* bit goes high.
  • 0 means interrupt is enabled, if the corresponding I_* bit goes high also the INT pin will go high.

So for the mentioned example: When wanting to wait for ST25R3916_IRQ_MASK_DCT, it will clear the mask bit.

Regards, Ulysses

hChan.11
Associate II

Hi

Thank for your prompt response , By default there is no another other interrupt is enable then what your are saying is if st25r3916EnableInterrupts( ST25R3916_IRQ_MASK_DCT ) will set the M_dct bit to 0 and rest of the bit to 1 for disable other interrupt ?As for st25r3916DisableInterrupts( ST25R3916_IRQ_MASK_WT ) will set M_dct bit to 1?Also how is the st25r3916EnableInterrupts function indicate to the MCU that some type of interrupt is no resolved? Thank you very much

Best regards,

Chan
_legacyfs_online_stmicro_images_0693W00000bkYAFQA2.png

hChan.11
Associate II

Hi

I would like to ask If the situation is like what you said so only when the st25r3916DisableInterrupts( ) this function will set the mask to 1 to disable the interrupt? Also do you have any idea why to solve the problem like the program get stuck at ST25R3916B test and the program get stuck at st25r3916ExecuteCommand(direct command) and I do not disable the M_dct and M_dct is 0.The irq pin is pulled to high after the execution of the command but the irq doesn't get back to low.

Thanks a lot.

Best regards,

Chan

Brian TIDAL
ST Employee

Hi,

make sure to globally define ST25R3916B and to not define it only in some sources.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.