FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2014 Threads] STM32F0 Discovery FreeRTOS LED blinking example not working.Posted by aruns06 on June 11, 2014 Hi,
I am trying to load a freeRTOS LED blinking program in to STM32F0 discovery board using IAR. The sample project is available with FreeRTOS. I was able to build the source code and it acts like it's uploaded and a multicolour LED is blinking as the indication of communication. I wrote a sample LED bliking program using KEIL and the code is working file. After that again I uploaded the freeRTOS blinky example and still the old code is running. While download and Debug session, I was not able to see the tasks and Queues, which is supposed to be visible. Do I have to change any configuration files??????
new to RTOS :-)
Thanks,
Arun
STM32F0 Discovery FreeRTOS LED blinking example not working.Posted by rtel on June 11, 2014 I'm not sure I understand the scenario you are describing, but I think you are saying:
1) You downloaded the IAR demo from the FreeRTOS release - which seemed to get programmed into the device but you didn't say if it behaved as expected or not.
2) You then switched to using Keil and created your own program.
3) You went back to the IAR demo, but this time when you try running it you find the Keil program you were using is still running.
If that is the case then it sounds like you are not actually programming the device when you are using the IAR tools.
Open the project in IAR and go to the project's options. In the options window select the Debugger category. In that category select the Setup tab and check that the Driver is set to the correct interface (STLink, J-Link, or whatever) and not to Simulator. Next in the same category select the Download tab and ensure Use Flash Loader is selected - if it is not selected then it won't program the flash.
Regards,
Richard Barry
STM32F0 Discovery FreeRTOS LED blinking example not working.Posted by aruns06 on June 11, 2014 Yes that's correct.
> 1) You downloaded the IAR demo from the FreeRTOS release - which seemed to get programmed into the device but you didn't say if it behaved as expected or not.
It's in the debug session (don't know how to change back to release)
Thank god the code is now uploaded after I select"Use Flash Loader" and then select overrise default.board file and then chode " flashloaderSTFlashSTM32F051x8.board"
But the LED is not blinking. PC8 (LD4) and PC9 (LD3) are the two LED's connected. In the program, LED1 is selected. But in the board LED1 is different. So I tried LED1,2,3,4. But still I am not getting the result.
~~~~~~
if( ulReceivedValue == 100UL )
{
vParTestToggleLED( LED1 );
ulReceivedValue = 0U;
}
~~~~~~
This time the code is uploaded. But still, as i said, I'm not able to see anything in the task and Que window.
STM32F0 Discovery FreeRTOS LED blinking example not working.Posted by rtel on June 11, 2014 From your post it is clear to me that the LED is not blinking, but it is not clear to me if the code is actually running or not.
If you put a break point on the if() line in the code you posted, is it ever hit.
If not then there is something else wrong, not the bit being toggled for the LED.
But still, as i said, I'm not able to see anything in the task and Que window.
I'm not sure which window you mean. Do you mean in the FreeRTOS StateViewer plug-in for IAR?
Regards.
STM32F0 Discovery FreeRTOS LED blinking example not working.Posted by aruns06 on June 12, 2014
I'm not sure which window you mean. Do you mean in the FreeRTOS StateViewer plug-in for IAR?
Yes, StateViewer plug-in for IAR.
If you put a break point on the if() line in the code you posted, is it ever hit.
yes. I am able to set the break point in the function vParTestToggleLED( LED1 );
I am attaching 2 screenshots ,1 and 2. The first one I took when the code is running. Second one, when I press the break.
AttachmentsScreenshot2.JPG (118495 bytes)
STM32F0 Discovery FreeRTOS LED blinking example not working.Posted by rtel on June 12, 2014 So I'm not sure what you are saying is wrong.
It seems the program is running ok - if the LED is not toggling then either the port setting is not correct or the wrong pin is being toggled - and the StateViewer plug-in is showing the correct information.
Screenshot1.jpg shows the StateViewer probing the symbol table to see which features are built into the kernel (how FreeRTOSConfig.h is set) - if it can't find a particular feature it does not look again.
Regards.
STM32F0 Discovery FreeRTOS LED blinking example not working.Posted by aruns06 on June 12, 2014
It seems the program is running ok - if the LED is not toggling then either the port setting is not correct or the wrong pin is being toggled - and the StateViewer plug-in is showing the correct information.
This info corrected my doubt and now the code is working
in the stm320518_eval.h file I made the following change and now it's working. If we use the standard STM32F051R8T board, the correct configuration is show below. Wrong port was selected.
~~~~~~~~~~~~~
define LED1PIN GPIOPin8 // previously it was GPIOPin_10
define LED1GPIOPORT GPIOC
define LED1GPIOCLK RCCAHBPeriphGPIOC
define LED2PIN GPIOPin9 //previously it was GPIOPin_11
define LED2GPIOPORT GPIOC
define LED2GPIOCLK RCCAHBPeriphGPIOC
~~~~~~~~~~~~~
Thank you very much for the support.
Regards,
Arun.S
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|