Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner