The TI E2E™ design support forums will undergo maintenance from Sept. 28 to Oct. 2. If you need design support during this time, contact your TI representative or open a new support request with our customer support center.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL2-570LC43: Bare-metal support examples or library

Part Number: LAUNCHXL2-570LC43
Other Parts Discussed in Thread: HALCOGEN

I'm trying to get a bare-bone software environment set up.  Don't know where I can see examples.

Things I'm thinking are needed or not...

Simple schedule loop to do things, in lieu of processes/threads as in full OS.  Not sure how to "limit" slice time right now (or if it's really needed).  Will likely need drivers that are "non-blocking."

Timer queue running off a periodic timer interrupt.

Semaphore mechanism(s) to arbitrate use of resources, such as event queues.

Maybe some kind of profiling mechanism.

Additional facilities as needed.

Thanks for any help.

  • Don't know where I can see examples.

    Have you seen 2.3.1. Examples in the HALCoGen documentation?

    While you mention bare-metal support there are also HALCoGen examples which use FreeRTOS, and HALCoGen comes with a port for FreeRTOS.

  • Hi Peter,

    Please see the project 0 and project 1 which are bare-metal examples too.

    https://software-dl.ti.com/hercules/hercules_docs/latest/hercules/Examples/index.html

    The project 1 provides the following demos to highlight some of safety features:

    Demo 1: Light Sensor Demo. The USER LED blinking frequency is controlled by the ambient light sensor. Vary the intensity of the light on the sensor to observe the response.

    Demo 2: Force 1 bit Flash ECC error. Each press of USER SWITCH A button inserts 1-bit ECC error in flash. Each button press doubles the blink rate of USER LED A (LED2).

    Demo 3: Force 2 bit Flash ECC error. Each press of USER SWITCH B button inserts 2-bit ECC error in flash. nERROR lights up when fault is detected. Press USER SWITCH A button to clear nERROR LED.

    Demo 4: OSCILLATOR FAILURE OSCILLATOR FAILURE: oscillator can be killed placing jumper JP1 in OSC KILL position to create an oscillator fault which in turn creates error in system. ERR LED is ON as a result. Press nPORRT button (S1) to restore.

    Currently project 1 is offered on the launchpads of these platforms: RM42L4, RM46L8, RM57L, 570LC43, 570LS04 & 570LS12

  • Thanks for pointing to these examples.  I already have a testbed set-up that incorporates many of the devices (and device drivers) I will be using, and will surely make use of these examples as fitting or necessary.

    Right now, I (and my team) think a full RTOS would be overkill and likely prolong the development process.  I hear that FreeRTOS may take some time to get working, and supposedly there is a much lighter-weight TiRTOS that doesn't seem to be supported on the Hercules MCUs.

    Hence, I'm really just assembling whatever _software_ components for a bare-metal XL2-570LC43 environment can be assembled, without having to write code from scratch if possible.  For instance, I've incorporated the following already...

    https://github.com/eyalroz/printf

    https://github.com/MrBad/vsscanf

    It looks like the TI compiler supports a lot of the C-standard (non-OS related) APIs already, but it's not clear what facilities are really available.  Does TI offer a comprehensive list somewhere, or do I just do trial-and-err?

    Thanks.

  • Thank you for pointing this area out.  I will definitely check them out.

    Do you know what happened to the discussion below?  It seems this would form the basis of a "non-blocking" SCI (serial port) driver, which is what I'm seeking, so that the bare-metal scheduling loop would not be polling on the SCI device (as sciSend() and sciReceive() do).

    e2e.ti.com/.../tms570lc4357-sci-receive-using-dma

    Any other pointers to "software" facilities such as code for doing semaphores/mutexes//spinlocks etc (really between background verses interrupt level, or between cores) would be appreciated.  There is no (full) processes/threads, so the locking code would somehow suit a basic processing loop.

  • On a related note, is there any hardware on the XL2-570LC43 that could aid in doing simple timing, such as a free-running time counter that I can use to get the before-and-after snapshots to see how much time has elapsed in between?  Code example would even be better.

    Thanks.

  • On a related note, is there any hardware on the XL2-570LC43 that could aid in doing simple timing, such as a free-running time counter that I can use to get the before-and-after snapshots to see how much time has elapsed in between? 

    The Cortex-R5 contains Performance Measurement Unit (PMU).

    Found some example code in Cycle count is always zero when Performance Measurement Unit (PMU) is used in TI Hercules TMS570L

  • Thank a bunch.  The PMU stuff works great.