The following line:
|
(void)mss_config_clk_rst(MSS_PERIPH_MAC0, (uint8_t) MPFS_HAL_FIRST_HART, PERIPHERAL_ON); |
is a duplicate of the previous one, with following lines configuring respectively GEM_A (0) and GEM_B (1). It should be changed to
(void)mss_config_clk_rst(MSS_PERIPH_MAC1, (uint8_t) MPFS_HAL_FIRST_HART, PERIPHERAL_ON);