Problem of management of interrupts
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2003-07-08 3:32 AM
This discussion is locked. Please start a new topic to ask your question.
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2003-07-07 5:19 AM
Posted on July 07, 2003 at 14:19
Hi!
I'm working on a ST72F521R9T3 and the indart demo board of Softec. I want to manage interrupts on port A of my micrcontroller. When I change the value on port A with a DIPswitch, the program does not go to the interrupt function defined. When I look the value of PADR, it doesn't change. I'm sure that Port A is working. Here is my code, can you help me please? include ''ST72F5h'' include ''starth'' void main (void) { //enable interrupts asm RIM; // configures port A as input PADDR = 0x00; PAOR = 0xFF; // Configures port D as output PDDDR = 0xFF; PDOR = 0xFF; PDDR = 0x00; ISPR0 = 0x00; ISPR1 = 0x00; ISPR2 = 0x00; ISPR3 = 0x00; EICR = 0x00; // Enables the A/D peripheral on PC5 ADCCSR = 0x2D; for(; { // Waits for the end of the conversion while(!(ADCCSR & 0x80)) ; // Reads the A/D value and writes it on the LEDs PDDR = ADCDRH; } } pragma TRAP_PROC SAVE_REGS void interrupt 4 main_ei0(void) { while(PCDR!=0x20) PDDR=!PDDR; _startupData.main(); } [ This message was edited by: Junior on 07-07-2003 17:50 ] [ This message was edited by: Junior on 07-07-2003 17:51 ] [ This message was edited by: Junior on 08-07-2003 11:04 ]Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2003-07-07 10:33 PM
Posted on July 08, 2003 at 07:33
Sorry for the smiley in the code...
You must understand ''for ( ; ; )'' instead of ''for(;'' ''Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2003-07-08 1:37 AM
Posted on July 08, 2003 at 10:37
I want to understand that what does _startupData.main() do?
Can you provide your interrupt vector table?Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2003-07-08 3:32 AM
Posted on July 08, 2003 at 12:32
Ok No problem, Thanks it works now...
I had not seen the addendum who said that the inDART does not manage interrupts in Debug mode... Now it works perfectly, when I program the microcontroller.