AnsweredAssumed Answered

Trouble when dealing with ISR for ittyd (RS232 port on TWR-SER)

Question asked by Wei Gao on Jul 19, 2012
Latest reply on Dec 4, 2012 by Anthony Huereca

I am trying to learn how to use interrupt under MQX 3.8 with TWR-K60D100M

 

I enabled ttyd and ittyd in bsp

 

after I successfuly installed my isr, when it is triggered, code inside just keep being executed.

I put printf("hello"); in my isr, and when triggered, it keep print the string;

 

below is my code:

 

 

#include "main.h"TASK_TEMPLATE_STRUCT MQX_template_list[] = { /*  Task number, Entry point, Stack, Pri, String, Auto? */   {MAIN_TASK,   Main_task,   1500,  9,   "main", MQX_AUTO_START_TASK},   {0,           0,           0,     0,   0,      0,                 }};pointer fh_ptr;void new_isr(pointer user_isr_ptr){ printf("isr started\n");}void Main_task(uint_32 initial_data){   _int_enable(); fh_ptr = (pointer)fopen("ittyd:",(char const*)BSP_DEFAULT_IO_OPEN_MODE); _int_install_isr(INT_UART3_RX_TX,new_isr,NULL); _task_block();}

Outcomes