SPI1 Interrupt ****default_isr entered on vector

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI1 Interrupt ****default_isr entered on vector

Jump to solution
1,810 Views
yanjx116
Contributor II

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!

Labels (1)
Tags (1)
1 Solution
1,452 Views
nxf51211
NXP Employee
NXP Employee

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.

View solution in original post

11 Replies
1,452 Views
exgilenre
Contributor I

Yes pls share the code from your project..I mean if u dont mind..Actually i m also stuck in similar kind of situation..May be your code can help.Thanks myccpay

0 Kudos
1,452 Views
yanjx116
Contributor II

What exactly is your problem? You can leave your email so that I can share my project with you.

Best Wishes,

Isabel Yan

0 Kudos
1,452 Views
nxf51211
NXP Employee
NXP Employee

Hi,

Is it possible that you could share the code from your project so I can check on my side what might be the cause of your problem?

Best Regards,

Ricardo Delsordo

1,452 Views
yanjx116
Contributor II

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

0 Kudos
1,452 Views
nxf51211
NXP Employee
NXP Employee

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.

1,452 Views
yanjx116
Contributor II

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

|

|

0 Kudos
1,452 Views
nxf51211
NXP Employee
NXP Employee

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

1,452 Views
yanjx116
Contributor II

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

0 Kudos
1,453 Views
nxf51211
NXP Employee
NXP Employee

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.

1,451 Views
yanjx116
Contributor II

Hi Ricardo,

Thanks for your advice. I will disable the IRQ for all the SPIs these days and will let you know if I get any test results.

Best Regards,

Isabel Yan

0 Kudos
1,452 Views
yanjx116
Contributor II

Hi Ricardo,

I have sent an email to you with the code attached. Thanks for your help!

Best Wishes,

Isabel Yan

0 Kudos