MSC with FreeRTOS 8.2.3 on E70

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

I spend now a couple of days trying to get the FreeRTOS MSC example to run with FreeRTOS 8.2.3 (chosen from the ASF Wizard). So far I was not able to do this because FreeRTOS crash right at the beginning when it calls prvPortStartFirstTask(). This did not happen with FreeRTOS7.0.0 or FreeRTOS 7.3.0. However all 3 versions could be chosen from ASF. Does anyone has an idea where this comes from?

 

Best Regards

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm getting the same issue when I add FreeRTOS 8.2.3 to a project with ASF and create the simplest set of tasks possible (the same as the FreeRTOS example project, which incidentally works).

 

The SVC_Handler() interrupt handler is being called in the course of the call to prvPortStartFirstTask from within xPortStartScheduler.

 

I'm quite confounded at the moment as to why this should be occurring. Anybody have any clues?

 

(Atmel Studio 7.0.1188, ASF 3.33, SAMV71Q21 device)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks like the problem is that ASF fails to put a few crucial lines into the default FreeRTOSConfig.h file. These need to be at the bottom:

/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
standard names. */
#define xPortPendSVHandler PendSV_Handler
#define vPortSVCHandler SVC_Handler
#define xPortSysTickHandler SysTick_Handler

Those are from the FreeRTOS example project, but are not in the config generated by ASF wizard. It looks like SVC_Handler is being used deliberately by FreeRTOS and without those lines it was going to the interrupt Dummy_Handler() (to loop forever).

 

It's working now for me.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This was a huge help.  Thanks for posting this.  This fixed my problem, too.