Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

[FreeRTOS+IO] interrupt modes only on highest peripherals?

Posted by simonk87 on September 23, 2013

Hello all!

I'm playing with the FreeRTOS demo application on the default LPXExpresso board from Embedded Artists. I'm using demo 2 to write and read files on an sd card. Works perfectly!

Now I'm trying to port the demo 2 to a custom made pcb: the sd card is connected to SSP0 instead of SSP1. I created a new board support package and started the program, the polling mode works fine! But directly after enabling ioctlUSEZEROCOPYTX and ioctlUSECIRCULARBUFFERRX I find the processor to jump to the IntDefaultHandler. I'm trying to find out why:

  • There is probably no interrupt handler: I only see the function SSP1IRQHandler( void ) in "FreeRTOSlpc17xx_uart.c". The rest of the file looks very generic with the use of SSPx everywhere.
  • Where is the interrupt handler SSP0 ? Is it not supported in other modes than polling? Or is there some trick that it should fall trough to the latest peripheral?

Setup:

  • I'm using an NXP LPC1769.
  • Latest version of FreeRTOS: 7.5.2
  • I only could find the source for FreeRTOS+IO in the demo itself, it's not included in the FreeRTOS zip for as far as I could see. In the headers it's saying version 1.0.1 is this the latest version?

Thank you very much in advance. I would really like to get this running in interrupt mode as well.

Best regards, Simon Koudijs

Ps. I tried the same for the UART implementation, UART0 is also only working in polling mode. I can only find a interrupt handler for UART3 (UART3_IRQHandler). UART3 works fine.


[FreeRTOS+IO] interrupt modes only on highest peripherals?

Posted by richardbarry on September 23, 2013

The interrupt handler SSP1IRQHandler is in FreeRTOSlpc17xxssp.c. If you are using SSP 0 you should just be able to change the name of the handler to SSP0IRQHandler() for it to get called at the appropriate time - then change the accesses to LPCSSP1 inside the function to instead go to LPCSSP0.

Probably best to cut and past the entire function, then make the modifications to the copy of the function, so both ports are then supported at the same time.

Regards.


[FreeRTOS+IO] interrupt modes only on highest peripherals?

Posted by simonk87 on September 24, 2013

Thank you for the information. I implemented the ISR and it now works like it should.

I attached the two adjusted file for someone else that finds this question. Perhaps they can me merged into the main branch of FreeRTOS+IO? I could imagine that more people would benefit from this.

Where do I find the latest version of these files anyway? They are not included in the main FreeRTOS zip. Only in the provided example.

Thanks for the effort, Simon

Attachments

FreeRTOS_ssp.h (2443 bytes)
FreeRTOS_uart.h (2430 bytes)

[FreeRTOS+IO] interrupt modes only on highest peripherals?

Posted by richardbarry on September 24, 2013

Those are the latest files - we don't put them in the main download because they are a bit too chip specific.

Thanks for your attachments.

Regards.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists