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

Software Timer

Posted by sindhukrishnan on October 6, 2015

Hello !

I use TMS570LS0432 from TI and FreeRTOS code generated from HALCoGen v04.04.00. I tried with example usage for software timers that is mentioned in ostimer.h. I see that after I run debug session, the control enters the first line of the code shown below (osportasm.asm).

;/-----------------------------------------------------------/ ; Start the first task by restoring its context.

    .def vPortStartFirstTask
    .asmfunc

vPortStartFirstTask cps #0x13 portRESTORE_CONTEXT .endasmfunc ;/-----------------------------------------------------------/

Later to this the control enters data_abort in dabort.asm

;/-----------------------------------------------------------/ Run Memory Test

.ref	custom_dabort
.def	_dabort
.asmfunc

_dabort stmfd r13!, {r0 - r12, lr}; push registers and link register on to stack

    ldr		r12, esmsr3			; ESM Group3 status register
    ldr		r0,  [r12]
    tst		r0,  #0x8			; check if bit 3 is set, this indicates uncorrectable ECC error on B0TCM
    bne		ramErrorFound
    tst		r0, #0x20			; check if bit 5 is set, this indicates uncorrectable ECC error on B1TCM
    bne		ramErrorFound2

noRAMerror tst r0, #0x80 ; check if bit 7 is set, this indicates uncorrectable ECC error on ATCM bne flashErrorFound

	bl		custom_dabort		; custom data abort handler required
								; If this custom handler is written in assembly, all registers used in the routine
								; and the link register must be saved on to the stack upon entry, and restored before
								; return from the routine.

	ldmfd	r13!, {r0 - r12, lr}; pop registers and link register from stack
	subs	pc, lr, #8			; restore state of CPU when abort occurred, and branch back to instruction that was aborted

;/-----------------------------------------------------------/

What is the reason behind this? Please suggest to solve this issue. Thanks in advance !


Software Timer

Posted by rtel on October 6, 2015

What is the reason behind this?

At this time, I'm afraid I have no idea. I'm not familiar with the project you refer to, the source code looks different from the port in the FreeRTOS download, and you don't say at which point the abort occurs - but as a first guess I would say perhaps the FreeRTOS interrupt handlers are not installed.


Software Timer

Posted by sindhukrishnan on October 7, 2015

The project is not downloaded from FreeRTOS but I refer to this software timer example found in the end of in FreeRTOS site -- http://www.freertos.org/FreeRTOS-timers-xTimerCreate.html

This example was ported to FreeRTOS project created using HALCoGen of TI.


Software Timer

Posted by rtel on October 7, 2015

I tried cutting an pasting the example from the web page you linked to and found I had to make one edit to enable it to run as expected.

The timer period was being set to ( 100 * x ), but this equals 0 when x is 0, and 0 is not a valid period for a timer. I therefore changed this to ( 100 * x ) + 100, and then everything was good.

I have updated the web page accordingly.

Regards.


Software Timer

Posted by sindhukrishnan on October 9, 2015

Thanks for the support. I would like to know which controller was used to test this code. As mentioned earlier I used the following for this project TMS570LS0432 from TI and FreeRTOS code generated from HALCoGen v04.04.00. So please explain the environment where this code was used. Also let me know what is the use and impact of mpu_wrappers in timer?


Software Timer

Posted by rtel on October 9, 2015

The test was done in the FreeRTOS Windows port, but should run on any of the 30+ FreeRTOS ports, assuming correct configuration.

Our TMS570 port does not use mpu_wrappers.h.

Regards.


Software Timer

Posted by sindhukrishnan on October 9, 2015

Referring to this answer, "Our TMS570 port does not use mpu_wrappers.h." does it mean Software Timer will work independent of the MPU settings being done in TMS570?


Software Timer

Posted by rtel on October 9, 2015

It means our port does not use the MPU in the TMS570.


[ 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