Running CGps in a Multithreaded environment on the WMP100 k


#1

I am having great trouble getting my GPS module working when using multiple tasks on the WMP100 dev. kit.

I’m using:
eRide Opus 3 GPS Chipset (NanoRide).
C-GPS-OPUS-III Open AT Plug-in Package: 3.4.0.20.20

WMP100 Dev kit
Firmware: 7.3.0.00
Open AT Os Package: 6.20.0.04

Dev. Environment: M2M Studio (Based on Eclipse IDE)

Problem description:
To simplify the scenario that produces my problem I have taken the SimpleSample CGps project supplied by Wavecom and modified it to use 3 tasks.

Working setup
Task priority 3: My GPS code
Task priority 2: Task writing a string to the UART1
Task priority 1: Task writing a string to the UART1

NOT Working setup (The setup where the GPS code is at the lowest priority also crashes.)
Task priority 3: Task writing a string to the UART1
Task priority 2: My GPS code
Task priority 1: Task writing a string to the UART1

The SimpleSample is then ofc not started using the main method, but the task callback from the Open AT firmware.
If I ensure that the task running the SimpleSample code is running as the highest priority task it all works like a charm.
But as soon as I change the priority on the GPS task to either 2 or 1 (one of the 2 lowest) it crashes badly. It seems to be a stackoverflow error,
but that doesn’t make sence to me, since it works in high priority. And I can add the fact that I have tried to use ridicolous big stacksizes, which should
eliminate that reason.

Have any of you fellow dev. had this issue?
If so I would be glad to get some feedback.

I have attached the modified simpleSample code. Both the high priority proecjt (Working) and the low priority (not working)
I assume it is important that you use the exact same platform as me and the same firmware version ? to reproduce the problem.

Working project: TestSimpleSampleHighPriority.zip
NOT Working project: TestSimpleSampleLowPriority.zip

Kindly regards
Sbmadsen