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.

LP-AM261: USB CDC in HS-SE device

Part Number: LP-AM261


Tool/software:

Hi,

I am currently experimenting with the Secure Boot related functionalities.

We have an SBL image and Application Image.

Application image has USB CDC capability.

USB CDC application is running as expected.

Then, I converted the device (LP) to HS SE.

hs.tiimage of the SBL image is generated.

But when I commented out the HSMRT loading step in SBL image:

     Application image is running, but USB functionality is not working (Actually, USB interrupts are not getting triggered)

    Note: We have already modified the SBL to support loading of unsigned application images (This we are doing as temporary implementation)

So, the question is "Is it necessary to load HSMRT in SBL for USB functionality in Application to work in HS-SE device?"

If the answer is yes, why? is there a way to bypass that.

Note: We will anyway load the HSMRT at our final use case. (This we are trying as an intermediate step)

  • Hi Nithin,

    A few questions:

    1. Does the same .appimage work with HS-FS device (the CDC application)?

    2. Do you see the issues in case of HS-SE device in case of USB only? Or have you tried some other examples and seen the same behaviour (interrupts not getting triggered)

    HsmRt loading should not impact this ideally.

    Regards,
    Shaunak

  • Hi Shaunak,

    Does the same .appimage work with HS-FS device (the CDC application)?

    Yes

    Do you see the issues in case of HS-SE device in case of USB only? Or have you tried some other examples and seen the same behaviour (interrupts not getting triggered)

    I think other peripherals are working fine.

    I have tried the following scenario also:

    sbl_ospi_am261x-lp_r5fss0-0_nortos_ti-arm-clang + cdc_echo_am261x-lp_r5fss0-0_nortos_ti-arm-clang : In this case USB is enumerating

    But when i removed hsmrt loading step from sbl_ospi_am261x-lp_r5fss0-0_nortos_ti-arm-clang USB is not enumerating.

    To be clear

    Is it necessary to load HSMRT in HS-SE device?

    Thanks

    Nithin

  • Hi Shaunak,

    I have one more observation.

    There is one specific MPU setting in HSMRT without which USB is not enumerating.

    Even if HSMRT(without CONFIG_MPU_FIREWALL8) is loaded USB is not enumerating.

    Auto generated code for that is:

    {

         .id = CSL_FW_L2OCRAM_BANK2_SLV_ID,
         .regionNumber = 0,
         .startAddress = 0x70100000u,
         .endAddress = 0x7017FFFFu,
         .supervisorReadConfig = 1,
         .supervisorWriteConfig = 1,
         .supervisorExecConfig = 1,
         .userReadConfig = 1,
         .userWriteConfig = 1,
         .userExecConfig = 1,
         .nonSecureConfig = 1,
         .debugConfig = 1,
         .aidxConfig = 1,
         .aidConfig = (0x1<<PRIV_ID_CPSW) | (0x1<<PRIV_ID_ICSSM0) | (0x1<<PRIV_ID_ICSSM1) | (0x1<<PRIV_ID_M4FSS0_0) | (0x1<<PRIV_ID_R5FSS0_0) | (0x1<<PRIV_ID_R5FSS0_1) | (0x1<<PRIV_ID_USB),
    },

    Please look into this

    Thanks

    Nithin

  • Hi Nithin,

    From the above auto-generated code, it is sure now that the issue is with Firewall blocking the USB. If the above code-segment is not present, the default Firewall config is "no-access".

     .aidConfig = (0x1<<PRIV_ID_CPSW) | (0x1<<PRIV_ID_ICSSM0) | (0x1<<PRIV_ID_ICSSM1) | (0x1<<PRIV_ID_M4FSS0_0) | (0x1<<PRIV_ID_R5FSS0_0) | (0x1<<PRIV_ID_R5FSS0_1) | (0x1<<PRIV_ID_USB),

    By default, in case of HS-FS device, the above Peripheral cores/ CPUs will be "Open to all initiators", but in case of HS-SE device, it will be blocked by default by ROM itself.

    Then, we need HSMRT to unblock them. If we don't have HSMRT, it will be blocked. Specifically, even if you load HSMRT but don't have the above MPU Config present, it will still be blocked.

    Regards,
    Shaunak

  • So, the question is "Is it necessary to load HSMRT in SBL for USB functionality in Application to work in HS-SE device?"

    For using USB, CPSW, ICSSM, Yes HSMRT would be necessary.

    There is no good way to bypass loading HSMRT here. HSMRT is the one who would be setting this firewall config. I.e. syscfg would also send request to hsmrt itself to open the firewall, no other core can open the Firewall in HS-SE mode. So we would need HSMRT.

    Note: We will anyway load the HSMRT at our final use case. (This we are trying as an intermediate step)

    I would like to understand why are we trying to skip HSMRT (even if temporarily)

    Regards,
    Shaunak