When I run my program(It is an endless loop), it stops running and display "SPI1 Interrupt****default_isr entered on vector
" on the serial port sometimes. But I did not use the resources of SPI. By the way, I am using KL46.
If you can help me to solve my problem, I will be very grateful!
已解决! 转到解答。
Hi Isabel,
Thank you so much for answering my previous questions. I'm still checking your code and unfortunately I still haven't found what could be the issue. The only idea I have right now is that you could explicitly disable the IRQ for all the SPIs (inside the System_init function, add the disable_irq for SPI0 and SPI1) as an attempt to avoid the SPI1 interrupt. I'll keep looking for the cause of your problem and will let you know if I find anything.
Best Regards,
Ricardo Delsordo.
Thanks for your reply.
But it is not a test code, it is a project for a smart car. You may not be convenient to check without corresponding hardware.
If you have a way to test, of course, I can share the code and I would be very thankful. (but how could I upload my project?) If you could tell me the probable cause of the problem, I will be happy, too.
Best wishes,
Isabel Yan
Hi Isabel,
I'm sending you an email so you can send me your code through there so I can see what could be the problem; I wouldn't test it, I will just check the code and see if by any chance you didn't enable an SPI register or any related peripheral by mistake (this probably may be the issue).
NOTE: Please send your mail with ONLY the code attached, and continue the conversation through here.
Best Regards,
Ricardo Delsordo.
Hi Ricardo,
Thanks for your help!
But I am from China, the program notes are in Chinese. If you need any explanation, please tell me.
Best Wishes,
Isabel Yan
Isable Yan
|
|
yanjx116@163.com
|
签名由网易邮箱大师定制
On 4/6/2019 00:38,nxf51211<admin@community.nxp.com> wrote:
|
|
NXP Community
|
|
Re: SPI1 Interrupt ****default_isr entered on vector
reply from Ricardo Delsordo in Kinetis Microcontrollers - View the full discussion
Hi Isabel,
I'm sending you an email so you can send me your code through there so I can see what could be the problem; I wouldn't test it, I will just check the code and see if by any chance you didn't enable an SPI register or any related peripheral by mistake (this could probably be the issue).
NOTE:Please send your mail with ONLY the code attached, and continue the conversation through here.
Best Regards,
Ricardo Delsordo.
Reply to this message by replying to this email, or go to the message on NXP Community |
Start a new discussion in Kinetis Microcontrollers by email or at NXP Community |
Following Re: SPI1 Interrupt ****default_isr entered on vector in these streams: Inbox |
This email was sent by NXP Community because you are a registered user.
You may unsubscribe instantly from NXP Community, or adjust email frequency in your email preferences
|
|
Hi Isabel,
Thank you for sharing your code with me.
I've started to check your project, and I have a few questions I'd like to ask you before I can continue:
1) The problem you encounter happens at random times of your execution, or when executing a specific part from your code? If it is at a specific part, which one is it?
Also:
2) Which IDE are you using to develop your project? (ex: MCUXpresso, CodeWarrior, etc)
3) I've seen you have a file called VCAN_NRF24L0.c (inside the source files from the Board folder) where you have a function called nrf_init where you initialize SPI. Do you use this function when you execute your code?
Best Regards,
Ricardo Delsordo
Hi Ricardo,
1) Actually, it happens at random times of my execution. But I found that it often happens in two situations.
One is when my Bluetooth connection is accidentally disconnected. The relevant codes of Bluetooth transceiver are in the file "wifi.c" and "wifi.h"(Even though it is called "wifi").
The other is when it runs to "EnableInterrupts; ", (This code is in the file "Sys_init.c", the function "void System_init()").
2) I use IAR Embedded Workbench to develop it.
3) I did not use that function when I execute my code. (The source files include the underlying code for many modules, but I did not use all of them.)
Thanks for your reply, sincerely.
Best Regards,
Isabel Yan
Hi Isabel,
Thank you so much for answering my previous questions. I'm still checking your code and unfortunately I still haven't found what could be the issue. The only idea I have right now is that you could explicitly disable the IRQ for all the SPIs (inside the System_init function, add the disable_irq for SPI0 and SPI1) as an attempt to avoid the SPI1 interrupt. I'll keep looking for the cause of your problem and will let you know if I find anything.
Best Regards,
Ricardo Delsordo.