PROCESSOR-SDK-AM62X: SDL VTM R5

Expert 2350 points
Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: SK-AM62

Tool/software:

MCU SDK version: mcu_plus_sdk_am62x_10_01_00_33

Test EVM: SK-AM62

CCS version: 12.8.1

I imported the example from C:\ti\mcu_plus_sdk_am62x_10_01_00_33\examples\sdl\vtm\vtm_uc\am62x-sk\r5fss0-0_freertos

Then, I compiled the R5 projects and copied the generated appimage.hs_fs into the below path.

--file=sbl_prebuilt/am62x-sk/WZ_Debug/vtm_example_am62x-sk_r5fss0-0_freertos_ti-arm-clang.appimage.hs_fs --operation=flash --flash-offset=0xA00000
I use the file below to flash the test examples.
Below is the UART log from DM R5 UART
[16:46:03.889]收←◆Sciserver Testapp Built On: Dec 19 2024 04:51:59
Sciserver Version: v2024.12.0.0-REL.MCUSDK.K3.10.01.00.33+
RM_PM_HAL Version: v10.01.08
Starting Sciserver..... PASSED

 VTM Example Application

VTM_ESM_init: Init MAIN ESM complete 

 VTM_ESM_init complete
Starting Use Case 0 
SDL_VTM_config: starting test with threshold change

[16:46:04.912]收←◆sensor id                       : 0 
adc_code                        : 297 
temp in milli degree celcius    : 41124 
vtmTriggerTh: Setting lt_thr0_val temp to 37124 millidegrees Celsius, and adc_code_lt_thr0 = 280
vtmTriggerTh: Setting gt_thr1_val temp to 39124 millidegrees Celsius, and adc_code_gt_thr1 = 288
vtmTriggerTh: Setting gt_thr2_val temp to 46124 millidegrees Celsius, and adc_code_gt_thr2 = 318
Finished VTM threshold setting
case 0 success
InputTrig = 1, OutputResult = 0, ClearResult = 0
InputTrig = 1, OutputResult = 0, ClearResult = 0
InputTrig = 1, OutputResult = 0, ClearResult = 0
InputTrig = 1, OutputResult = 0, ClearResult = 0
InputTrig = 1, OutputResult = 0, ClearResult = 0
InputTrig = 1, OutputResult = 0, ClearResult = 0
InputTrig = 1, OutputResult = 0, ClearResult = 0
Question: Why did this demo example fail?
  • Could a TI expert help with this ticket?

  • Hello,

    I see similar issue with the freertos example in 10.1 version. I am checking on this error. The Nortos example is working as expected when I load it in CCS directly similar to the STOG example. Can you try to run that meanwhile.

    Regards,

    Nihar Potturu

  • No. I just tried to use the example of C:\ti\mcu_plus_sdk_am62x_10_01_00_33\examples\sdl\vtm\vtm_uc\am62x-sk\r5fss0-0_nortos.

    Use the CCS to load the program and run. It shows the same issue.

    Please take care, my test EVM board is SK-AM62.

  • Hello,

    I have compared the 10.1 and 11.0 examples. There have been slight modifications in the temperature sensor configuration. Please update the follow lines in the vtmTriggerTh function in vtm_example.c and then both the nortos and freertos examples work as expected.

    /* Set temp sensor for continuous mode */
    cfgTs.configTsCtrl = SDL_VTM_VD_CONFIG_CTRL_SET_CTL;
    cfgTs.tsCtrl_cfg.valid_map = SDL_VTM_TS_CTRL_MODE_VALID + SDL_VTM_TS_CTRL_RESET_CTRL_VALID;     /* Fields to be updated */
    cfgTs.tsCtrl_cfg.mode = SDL_VTM_TS_CTRL_CONTINUOUS_MODE;                                        /* Value to be set for continuous mode */
    cfgTs.tsCtrl_cfg.tsReset = SDL_VTM_TS_CTRL_SENSOR_NORM_OP; 
    SDL_VTM_initTs(SDL_VTM_INSTANCE_TS_0 , &cfgTs);
    
     

    Regards,

    Nihar Potturu

  • After changing __SVC_STACK_SIZE from 0x100 to 0x300 __SVC_STACK_SIZE = 0x0300; /* This is the size of stack when R5 is in SVC mode */

    It finally works with flashed software into the SPI flash.

    I also made the change to your proposal.

    [10:04:11.763]收←◆Sciserver Testapp Built On: Dec 19 2024 04:51:59
    Sciserver Version: v2024.12.0.0-REL.MCUSDK.K3.10.01.00.33+
    RM_PM_HAL Version: v10.01.08
    Starting Sciserver..... PASSED
    
     VTM Example Application
    
    VTM_ESM_init: Init MAIN ESM complete 
    
     VTM_ESM_init complete
    Starting Use Case 0 
    
    [10:04:12.786]收←◆sensor id                       : 0 
    adc_code                        : 326 
    temp in milli degree celcius    : 48100 
    vtmTriggerTh: Setting lt_thr0_val temp to 44100 millidegrees Celsius, and adc_code_lt_thr0 = 310
    vtmTriggerTh: Setting gt_thr1_val temp to 46100 millidegrees Celsius, and adc_code_gt_thr1 = 318
    vtmTriggerTh: Setting gt_thr2_val temp to 53100 millidegrees Celsius, and adc_code_gt_thr2 = 348
    Finished VTM threshold setting
    case 0 success
    
     Use Case 0 completed: Input Event Trigger = Step completed successfully, 
    
    Starting Use Case 1 
    sensor id                       : 0 
    adc_code                        : 329 
    temp in milli degree celcius    : 48810 
    vtmTriggerTh: Setting lt_thr0_val temp to 44810 millidegrees Celsius, and adc_code_lt_thr0 = 312
    vtmTriggerTh: Setting gt_thr1_val temp to 46810 millidegrees Celsius, and adc_code_gt_thr1 = 320
    vtmTriggerTh: Setting gt_thr2_val temp to 53810 millidegrees Celsius, and adc_code_gt_thr2 = 350
    Finished VTM threshold setting
    
     Use Case 1 completed: Input Event Trigger = Step completed successfully, 
    
    
    ESM Example Application summary
    -------------------------------
    Completed 2 Test Cases
    Received 1 High Priority Interrupts
    Received 5 Low Priority Interrupts
    
    Test Case Event Log
    ------------------
    
    Test Case 0: ESM Call back function called : grpChannel 0x4, index 0x9, intSrc 0x89 
      ESM instance #2, ESM interrupt type = Low Priority ESM event
    
    Test Case 0: ESM Call back function called : grpChannel 0x4, index 0x8, intSrc 0x88 
      ESM instance #2, ESM interrupt type = Low Priority ESM event
    
    Test Case 1: ESM Call back function called : grpChannel 0x4, index 0x9, intSrc 0x89 
      ESM instance #2, ESM interrupt type = Low Priority ESM event
    
    Test Case 1: ESM Call back function called : grpChannel 0x4, index 0xa, intSrc 0x8a 
      ESM instance #2, ESM interrupt type = High Priority ESM event
    
    Test Case 1: ESM Call back function called : grpChannel 0x4, index 0x9, intSrc 0x89 
      ESM instance #2, ESM interrupt type = Low Priority ESM event
    
    Test Case 1: ESM Call back function called : grpChannel 0x4, index 0x8, intSrc 0x88 
      ESM instance #2, ESM interrupt type = Low Priority ESM event
    
     VTM Example Application: Complete
     All Use cases have passed.