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.

CCS/TMS570LC4357: on-board light sensor application

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Dear masters,

I would like to learn further with TMS570LC4357 HDK by implementing the function:

using the on-board light sensor, ADC as input;

if input = 1, then 

output 1 and turn on one of the gio LED's.

what will be the drivers needed and what will be the best-practice functions for obtaining so?

  • Hello,

    For reading ADC inputs you will need ADC driver and for toggling LED - GIO driver.

    Both drives can be generated by HALCoGen ().
    In HALCoGen you will find Drivers tab where drivers can be  enabled. When a driver is enabled and you select Generate code form menus then files with APIs will be created. For the ADC module APIs will be in adc.c file and GIO APIs will be in gio.c file. After installing HALCoGen you will find examples under HALCoGen installation folder. Also description how to use this examples is HALCoGen Help. For GIO toggling you can use rtiBlinky example.

    Also you can take a look at TI's training pages: 

    There you will find tutorials how to turn on LEDs using GIO: training.ti.com/hercules-how-tutorial-turning-leds and how to use ADC : training.ti.com/hercules-how-tutorial-12bit-adc