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.

J721S2XSOMXEVM: Issue Accessing MCU Timer Register Space

Part Number: J721S2XSOMXEVM

I am trying to access the MCU register space to implement one of the requirements. However, as soon as I attempt to read from the register address 0x40400038 (as shown in the below screenshot MCU_Timer_Access_Failure_0.png),

MCU_Timer_Access_Failure_0.png

the entire memory region becomes inaccessible, as illustrated in the following screenshot MCU_Timer_Access_Failure_1.png

MCU_Timer_Access_Failure_1.png

I have tried reading this memory both through software and via the Peripherals menu in Trace32 IDE, but I encounter the same issue every time.

Do we have any solution for this? I would greatly appreciate any guidance or suggestions if someone has encountered this before.

 

With Regards,

Madhusudan Gupta

  • Hi Madhusudan Gupta,

    I am able to access the 0x40400038 register using both software and CCS direct memory access. Please find the attached screenshot for your reference.

    Timer_Reg_Access.zip

    Regards,

    Karthik

  • Hi,

    1) Are you using SBL for this image, If yes, from where I can download and use it, because I tried with sample code also, it is throwing same exception.

    2) What are your switch settings like SW3, SW8, SW9, SW13

    With Regards,

    Madhusudan Gupta

  • Hi Madhusudan Gupta,

    I am not using the SBL for this test. I am executing the .xer5f binary file directly through CCS, and the device is configured in No Boot mode.

    https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-j721s2/latest/exports/docs/psdk_rtos/docs/user_guide/evm_setup_j721s2.html 

    The switch settings I am using are:

    SW8[1–8]: 1000 1000
    SW9[1–8]: 0111 0000
    SW3[1–8]: 0xxx xxxx


    Regards,

    Karthik

  • Hi,

    It seems, MCU Timer is guarded by TIFS.

    To access them ownership needs to be transferred to R5 Core instead of SYSFW, What do you think ?

    With Regards,

    Madhusudan Gupta

  • Hello,

    FYI, We tried to enable it from firewall by writing following register and succeeded for MAIN Timer 0 -7, but not for MCU Timer peripherals.

     A) CBASS_FW_Idmtimer_dmc1ms_mcu_0_timer_cfg_vbp_fw_region_0_control  (0x45108000)  --   0x30A

    After writing 0x30A to the above register, the issue explained earlier in the description is 1 no longer occurred, and we were able to see the memory in dump.

    We then attempted the steps below to obtain read/write access, but were unsuccessful.

     B) CBASS_FW_Idmtimer_dmc1ms_mcu_0_timer_cfg_vbp_fw_region_0_permission_0 (0x45108004)  --  0x60FFFF

    We considered 0x60 for bit 16:23, as priv_id for MCU Core0 is 96 (0x60)

     C) CBASS_FW_Idmtimer_dmc1ms_mcu_0_timer_cfg_vbp_fw_region_0_permission_1 (0x45108008)  --  0x60FFFF

     D) CBASS_FW_Idmtimer_dmc1ms_mcu_0_timer_cfg_vbp_fw_region_0_permission_2 (0x4510800C)  --  0x60FFFF

     E) CBASS_FW_Idmtimer_dmc1ms_mcu_0_timer_cfg_vbp_fw_region_0_start_address_l,

    CBASS_FW_Idmtimer_dmc1ms_mcu_0_timer_cfg_vbp_fw_region_0_start_address_h,

    CBASS_FW_Idmtimer_dmc1ms_mcu_0_timer_cfg_vbp_fw_region_0_end_address_l,

    CBASS_FW_Idmtimer_dmc1ms_mcu_0_timer_cfg_vbp_fw_region_0_end_address_h

    were already having appropriate values as per MCU_Timer0 memory range i.e. 0x40400000 -- 0x40400FFF

     

    After this we attempted to write to the MCU_Timer peripheral address range to start the timer, but encountered exception as explained in the description because the memory region remained protected.

     

    Note: We got the access of MAIN Domain Timer 0 – 7, by following these steps mentioned in point A - E.

              I am looking forward to access MCU Domain Timer memory range and we don’t want to use SBL APIs, rather I am expecting register level details.

  • Hi Madhusudan Gupta,

    Could you please let me know whether there is a specific timer register that can be accessed from the MCU domain? If so, could you kindly provide the corresponding register address?


    Regards,

    Karthik

  • Hi Karthikeyan,

    There are 10 Timers in MCU domain MCU Timer0-9, I am trying to access all of them at different locations for different purposes.

    I am not getting access to any of them.

    Timer register details can found in excel sheet at following location
    https://www.ti.com/lit/zip/spruj28

    FYR,

    MCU Timer0 address range starting from 0x40400000 - 0x4040006F

    MCU Timer1 address range starting from 0x40410000 - 0x4041006F

    You can simply follow this schema (0x404<TimerID>0000 - 0x404<TimerID>006F) to calculate MCU Timer peripheral address range.

    With Regards,

    Madhusudan Gupta

  • Hi,

    Thank you for sharing the details .I will try on my end and get back to you.

    Regards,

    Karthik

  • Hi Madhusudan Gupta,

    I am able to access the MCU Timer0 and Timer1 registers directly at the register level. Please note that some timer registers or specific bits are read-only, so writes will not take effect. Make sure to access only the writable fields in each timer register and avoid writing to any reserved bits, as reserved fields are undefined and may cause unexpected behavior.

    Timer0_Access.zip

    Regards,

    Karthik

  • I totally understand about R/O or R/W access specifiers for the registers.

    I am trying to write 1 on CFG_TCLR.ST bit which is a R/W bit, and facing these explained issues.

  • Hi Madhusudan Gupta,

    I am able to access the ST bit in the TIMER_TCLR register (0x40400038) as mentioned earlier. Could you please let me know how you are attempting to access this register? Are you using any driver example for this, and which boot mode are you using? If possible, could you also share your code?

    Regards,

    Karthik