bug lpc1768, interrupt makes system freeze/crash

Status
Not open for further replies.

Brecht

Newbie level 5
Joined
Dec 8, 2012
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,349
Dear,

A system based on arm cortex m-3 and programmed in c/c++ containing a gps-module had this problem where it froze down. After testing I think it has to do with the interrupt-usage in de gps.cpp.
Not using these interrupts make the system run fine but then it loses the gps-functionality.

The students of previous year basically used it in every method/procedural in the gps.cpp file

I give some code (cannot give all because of confidentiality contract..)
but something is wrong here, that makes the system total go crash/freeze

what is the relationship between interrupts and stack overflow?
what kind of interrupt is NVIC_DisableIRQ()
should I be using a different kind of interrupt?

code:

#define GPS_UART UART1_IRQn

Serial gps_port(P2_0, P2_1);


void GPS_command_sentence(char command[])
{
// Disable interrupts for a while
NVIC_DisableIRQ(GPS_UART);

gps_port.printf(command);

// Enable interrupts
NVIC_EnableIRQ(GPS_UART);
}

In the initialization they basically use this method/procedural for command=setDGPSmode,setSBASenabled,setNMEAoutput,.. gps related commands

thank you for your help..
 
Last edited:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…