Suggest to add reading function for ISER on LPCOpen

cancel
Showing results for 
Search instead for 
Did you mean: 

Suggest to add reading function for ISER on LPCOpen

343 Views
jeremyhsiao
Contributor II

Hi,

According to user manual of LPC11U6X and this post LPC11 - interrupts during IAP , SW needs to temporarily disable interrupt before using IAP calls. My idea is to (1) backup ISER0 (2) write all-one to ICER0 (3) IAP-call (4) Write backup-value back to ISER0. However, without relevant function SW can only read it from register directly. 

Is it possible to add API to read ISER so that SW can read it without direct-accessing register?

Thanks.

BR 

Jeremy

Labels (1)
0 Kudos
1 Reply

263 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Jeremy Hsiao,

    Actually, you don't need to read out the ISER and clear ICER, you can just do it like the lpcopen periph_flashiap project.

   Before you do the IAP call, you disable the interrupt with this code:

     __disable_irq();

   After you finish the IAP function, you can enable the interrupt with this code:

   __enable_irq();

pastedImage_1.png

Wish it helps you!

If you still have question about it, please kindly let me know.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos