Enabling USART interrupt sources makes only the first task start

But, when I have the USB cable from the FTDI chip to my computer connected, then it works, all tasks start. Have I missed something? This is my init of uart: void trvInitCLIUART( void ) { volatile avr32usartt *usart = trvCLIUSART; // CLI – USART1 INIT static const gpiomapt USARTGPIOMAP = { {trvCLIUSARTRXPIN, AVR32USART1RXD00FUNCTION}, {trvCLIUSARTTXPIN, AVR32USART1TXD00FUNCTION} }; static const usartoptionst USARTOPTIONS = { .baudrate = trvCLIUSARTBAUD, .charlength = trvCLIUSARTCHARLENGTH, .paritytype = USARTNOPARITY, .stopbits = USART1STOPBIT, .channelmode = USARTNORMALCHMODE };
trvUART_CLI_CREATE_QUEUES();

portENTER_CRITICAL();
{
    gpio_enable_module( USART_GPIO_MAP, sizeof(USART_GPIO_MAP) / sizeof(USART_GPIO_MAP[0]) );

    usart_init_rs232( trvCLI_USART, &USART_OPTIONS, F_CPU );

    // disable receiver and transmitter. */
    usart->cr |= AVR32_USART_CR_RXDIS_MASK | AVR32_USART_CR_TXDIS_MASK;

    trvUART_CLI_ISR_reg();

    /* Enable USART interrupt sources (but not Tx for now)... */
    usart->ier = AVR32_USART_IER_RXRDY_MASK;

    /* Enable receiver and transmitter... */
    usart->cr |= AVR32_USART_CR_TXEN_MASK | AVR32_USART_CR_RXEN_MASK;
}
portEXIT_CRITICAL();


trvCLI_ClearScreen();
//trvCLI_WriteLine( "Debug USART initiatednr" );
}

Enabling USART interrupt sources makes only the first task start

Sorry – I have no idea what you are trying to do, or what is wrong: http://www.freertos.org/FAQ-how-to-use-the-FreeRTOS-support-forum.html

Enabling USART interrupt sources makes only the first task start

Im usign v8.2.2 of freeRTOS together with ATMEL UC3. Im using my own custom PCB, no demo board. For CLI im using UART1 which is connected to a FTDI chip. I have also two tasks which is blinking two LEDs in different freq (just to see that it is alive). As long as I have the USB from FTDI chip connected to my computer, the two tasks is running, I get text on the console and so on… When I disconnect the USB for the console, only the first task starts. I then connect the FTDI USB to the computer and it is alive. I can also boot the board with USB from FTDI connected to computer, then disconnect it, and the two tasks is still running. So it has something to do with usart->ier = AVR32USARTIERRXRDYMASK. When I delete that line in the code above, it always works (two LEDs blinking), with or without the USB from FTDI connected to the computer (but not the interrupt).

Enabling USART interrupt sources makes only the first task start

Hi Adis, I’m afraid that the information that you’re giving is still not enough to give some advice. You are setting an RX-ready interrupt, and I presume that somewhere the code (the ISR) checks what interrupts have been enabled. One of your tasks stops blinking the LED: it sounds like it stays in a blocking call for ever. If I were you I would use a limited value for xBlockTime so you are able to show more information and/or to set breakpoints. Please give more information or attach some sample source code if you like. Regards.

Enabling USART interrupt sources makes only the first task start

Hi Hein I think I found the problem. In my code in the first post, if I only enter this: usart->cr = AVR32USARTCRTXENMASK; To be said; im using external RAM. The init of the SDRAM and vPortDefineHeapRegions() is done after the UART init. So when I put the usart->cr = AVR32USARTCRRXENMASK; after the SDRAM init it works. The strange thing is why did it work before with the USB cable connected to the computer.

Enabling USART interrupt sources makes only the first task start

The strange thing is why did it work before with the USB cable connected to the computer.
Maybe you board had somehow rebooted and therefore the SDRAM was still properly initialised?