Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] i had a problem with stellaris micro lm3s9b92 and FREE-RTOS

Status
Not open for further replies.

juan_manuell

Member level 4
Joined
Feb 23, 2002
Messages
72
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Location
Argentina
Activity points
626
hi, i am using the board EK-LM3S9B92-B. I was using it with the demos and all was fine. I made my own proyect with a realtime tick of 1ms. All works well.

I begun to learn about FREE-RTOS. I download it. Read about it. And i comment from the example all about a display because it was for other board and micro.
Well i made one task to test it. I change from proyect the device to the one that i am using. I check the only one function that could make something wrong, that was the one that initialize the hardware.

So i download with the jlink (that i was using before with others examples). I begun in debug mode i and when i go to the funtion of hardware never comeback.
The board never respond. And now the board not respond anymore.

This is the log when try to connect

Logging started @ 2010-09-29 15:10
DLL Compiled: Dec 11 2009 10:15:10

Firmware: J-Link ARM V8 compiled Dec 1 2009 11:42:48
Hardware: V8.00
S/N: 158004091
OEM: IAR returns O.K. (0062ms, 0000ms total)
T01F4 000:062 JLINKARM_GetDLLVersion() returns 41005 (0000ms, 0062ms total)
T01F4 000:063 JLINKARM_GetCompileDateTime() (0000ms, 0062ms total)
T01F4 000:063 JLINKARM_GetFirmwareString(...) (0000ms, 0062ms total)
T01F4 000:063 JLINKARM_SelectDeviceFamily(3) (0000ms, 0062ms total)
T01F4 000:064 JLINKARM_SetSpeed(32) (0001ms, 0062ms total)
T01F4 000:067 JLINKARM_SetResetDelay(0) (0000ms, 0063ms total)
T01F4 000:067 JLINKARM_ResetPullsRESET(ON) (0000ms, 0063ms total)
T01F4 000:067 JLINKARM_Reset() >0x2F8 JTAG>TotalIRLen = 4, IRPrint = 0x01 >0x30 JTAG> >0x210 JTAG> >0xF8 JTAG> >0xF8 JTAG> >0xF8 JTAG>Identified core does not match configuration. (Found: Cortex-R4, Configured: Cortex-M3) >0x98 JTAG>
***** Error: Could not power up debug port: Control/Status register reads 00000000 (0088ms, 0063ms total)
T01F4 023:387 JLINKARM_GetIdData(...) ScanLen=0 NumDevices=0 aId[0]=0x00000000 aIrRead[0]=0 aScanLen[0]=0 aScanRead[0]=0 (0001ms, 23381ms total)
T01F4 023:388 JLINKARM_Halt() returns 0x01 (0000ms, 23382ms total)
T01F4 023:388 JLINKARM_IsHalted() returns FALSE (0000ms, 23382ms total)
T01F4 023:388 JLINKARM_ReadMemU32(0xE000ED00, 0x0001 Items, ...) -- Data: AA AA AA AA returns 0xFFFFFFFF (0000ms, 23382ms total)

Closed

Using the programmer that come with the board giveme this response

Wed Sep 29 15:33:42 2010: Loaded macro file: C:\Archivos de programa\IAR Systems\Embedded Workbench 5.4\arm\config\flashloader\TexasInstruments\
FlashLM3Sxxx.mac
Wed Sep 29 15:33:42 2010: JTAG Speed is set to: 500 kHz
Wed Sep 29 15:33:55 2010: Fatal error: **ERROR**: JTAG initialization failed 0x00000004 Session aborted!
Wed Sep 29 15:33:55 2010: Failed to load flash loader: C:\Archivos de programa\IAR Systems\Embedded Workbench 5.4\arm\config\flashloader\
TexasInstruments\FlashLM3SxxxRAM32K.out
Wed Sep 29 15:33:55 2010: Failed to load flash loader: C:\Archivos de programa\IAR Systems\Embedded Workbench 5.4\arm\config\flashloader\
TexasInstruments\FlashLM3Sx8xx.flash


I really don´t know what happen.
The hard funtion has the next code

This function it is like come in software rtos
void prvSetupHardware( void )
{
/* If running on Rev A2 silicon, turn the LDO voltage up to 2.75V. This is
a workaround to allow the PLL to operate reliably. */
if( DEVICE_IS_REVA2 )
{
SysCtlLDOSet( SYSCTL_LDO_2_75V );
}

/* Set the clocking to run from the PLL at 50 MHz */
SysCtlClockSet( SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ );

/* Enable Port F for Ethernet LEDs
LED0 Bit 3 Output
LED1 Bit 2 Output */
SysCtlPeripheralEnable( SYSCTL_PERIPH_GPIOF );
GPIODirModeSet( GPIO_PORTF_BASE, (GPIO_PIN_2 | GPIO_PIN_3), GPIO_DIR_MODE_HW );
GPIOPadConfigSet( GPIO_PORTF_BASE, (GPIO_PIN_2 | GPIO_PIN_3 ), GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD );


// this only set like out a PIN0 of F port and has nothing connected
vParTestInitialise();

// agrego mi inicializacion de hard
// from here was added for me
// Enable the GPIO pin for the LED (PD0). Set the direction as output, and
// enable the GPIO pin for digital function.
//
GPIODirModeSet( GPIO_PORTD_BASE, GPIO_PIN_0, GPIO_DIR_MODE_OUT );
GPIOPadConfigSet( GPIO_PORTD_BASE, GPIO_PIN_0, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD );
GPIOPinWrite( GPIO_PORTD_BASE, GPIO_PIN_0, 0 );

}

Anyone has an advice about this or how i could solve it.
I go back to the proyect that come with the examples of board. And nothing happen. I had the same error.

Thanks in advance
 

I am having this EXACT same problem and have not been able to recover the device yet. I have tried using LM Flash Programmer, LMI FTDI, and J-Link all without success.

Do you have any follow up information on this problem?
 

I've been able to resurrect my board! I installed the J-Link Tools from Segger: segger.com/cms/jlink-software.html

I then run the application J-Link Commander.
Sometimes it complains that it cannot find a device on the JTAG chain, it may also complain that you have too old of a J-Link device without intelligence, but just ignore those.
Perform a Power-On-Reset of the chip, not a normal reset but a POR by removing and applying power again.
Into J-Link Commander, execute the following command "unlock LM3Sxxx" and following the instructions about holding reset down.

It may fail, do it again until it succeeds, performing a POR every time. When it succeeds then perform a POR, exit out of J-Link Commander and try to program a known working application.

I still cannot get the FreeRTOS project to work, I have tried lots of things and each time the chip gets into this state. I will continue working on the project until it's working. If you'd like to exchange emails maybe we can help each other get the project working.
 
I also got the FreeRTOS project working. I didn't use the project directly, rather I modified blinky and got it working that way. I like a self-contained project so I moved a few things around but have it operating at 80MHz with a single thread going that's flashing the LED using vTaskDelay and on the scope it's a VERY clean signal. If you'd like I would be willing to share the IAR project I have, message me your email and I'll send it off.

On Edit. I also found out why the FreeRTOS project killed our boards. We have an external crystal of 16MHz but the FreeRTOS project was configuring it as if it were an 8MHz crystal. That was the only change required to get the FreeRTOS project working. I changed the divide from 4 to 2.5 to get 80MHz.
 
Last edited:
Kafarr thank a lot. I was trying with LM tools and not found i could recover it. I will download the segger tool and try it.
I had change that of the crystal before. But well not matter. Now i will recover my board. I will send you a message about IAR proyect.

Thanks a lot

---------- Post added at 13:30 ---------- Previous post was at 12:46 ----------

Kafarr i downloaded the segger tool and works very well. I need to unlock it 2 times but after that i download a old proyect with a led blink and works very well.
Now i will look for the FREERTOS ;)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top