Suggest to add reading function for ISER on LPCOpen

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Suggest to add reading function for ISER on LPCOpen

538 次查看
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

标签 (1)
0 项奖励
1 回复

458 次查看
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 项奖励