已解决! 转到解答。
Hi Raghahanuma,
This fault is not caused by NVIC_EnableIRQ(PORTA_IRQn);,
This is because the clock gate for PORTA is not enabled, but you accessed PORTA->PCR[14].
Please enable the clock gate of PORTA.
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
NVIC_SetPendingIRQ(PORTA_IRQn);
After the clock issue is addressed,
why is that being used?
That will force the PORTA IRQ to fire and I2C is not yet configured.
The Accel itself will generate an IRQ when it is ready, after everything is correctly configured.
Hi Raghahanuma,
This fault is not caused by NVIC_EnableIRQ(PORTA_IRQn);,
This is because the clock gate for PORTA is not enabled, but you accessed PORTA->PCR[14].
Please enable the clock gate of PORTA.
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------