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.

J7200XSOMXEVM: How to modify MMR

Part Number: J7200XSOMXEVM
Other Parts Discussed in Thread: DRA821

I am using J7200XSOMXEVM to evaluate the uart of dra821. I tried to modify the uart baud rate to 12M based on the SDK demo “csl_uart_test_app”. According to the Technical Reference Manual of DRA821, I need to modify CTRLMMR_USART0_CLK_CTRL, set CLK_DIV to 0h-Divide by 1, and the input clock has been set to 192MHz, so I can set the baud rate to 12M. In the Technical Reference Manual, CTRL_MMR0 has 2 offsets: Proxy0 Offset and Proxy1 Offset, as well as 2 physical addresses. I tried to use the CTRL_MM R0_CFG0 Proxy0 Physical Address in the document to modify it, but it didn't seem to work. I have set up the MMR unlock before this. So what should I do to modify CTRLMMR_USART0_CLK_CTRL? What should be the correct step?

  • Zhaofei,

    To set the divider value bit 16 of the same register has to be cleared and then set to 1.  Have you done that?  Also which register did you unlock?  CTRLMMR_LOCK2 is the corresponding register to update.

    Thanks & Regards,

    Shiou Mei

  • I unlocked from lock0 to lock7 to make sure that it won't affect my modification of the register.

    Then I tried to write 0 to CTRLMMR_USART0_CLK_CTRL, and the read back value proved that I had changed CTRLMMR_USART0_CLK_CTRL to 0, but the clock sent to uart was still divided to 48MHz.

    So, I am not sure I really modified the register.

    I suspect that my steps are wrong. These caused the register not to be actually modified, or the modification did not work.

  • Now I can manually modify the MMR through CCS. I also need to modify the MMR through code. According to the user manual, each MMR register has 2 addresses: CTRL_MMR0_CFG0 Proxy0 Physical Address and CTRL_MM R0_CFG0 Proxy1 Physical Address. How to determine which address should be used?

  • Zhaofei,

    Proxy0 is designed for non-safety software (i.e. Linux), whereas proxy1 is designed for safety software (i.e. RTOS).

    Best Regards,

    Shiou Mei