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.

MCU-PLUS-SDK-AM243X: HSR mode not inizialized

Part Number: MCU-PLUS-SDK-AM243X

I work on a custom board based on AM243x with SDK mcu_plus_sdk_am243x_08_02_00_31

I have successfully tested PRP and I am now testing HSR with MII phy.

In the makefile industrial_comms/hsr_prp/icss_fwhal/makefile.mii.am243x.r5f.ti-arm-clang I removed -DBUILD_PRP and added -DBUILD_HSR_H.

This prevented the PRU firmware being compiled since in file hsrPrp_red_config.c there is #ifdef BUILD_PRP as condition to include PRU firmware binaries.

I changed such condition with #if (defined(BUILD_PRP) || defined(BUILD_HSR_H)) and I was able to start HSR and to get supervision packets.

Anyway, in the PRP demo example I cannot read HSR mode: I get always zero = unknown.

I found that HSR mode is set in hsrPrp_red_config.c, function RedPru1DmemInit but a pointer refers to pru0 instead iof pru1:

*((uint16_t *)((((PRUICSS_HwAttrs const *)(pruicssHandle->hwAttrs))->pru0DramBase) + LRE_HSR_MODE)) = HSR_MODE_INIT;

I supposed it was a mistake and I changed with pru1DramBase but in my example I cannot get it work.

Should be pru0DramBase or pru1DramBase ?

Thank you in advance

   Andrea