Skip to content

Commit

Permalink
ports/mimx: Update compatibility with MCUX_2.16.100 SDK.
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leech <[email protected]>
  • Loading branch information
pi-anl committed Nov 1, 2024
1 parent 728f457 commit cd79071
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 2,018 deletions.
3 changes: 2 additions & 1 deletion ports/mimxrt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ SRC_HAL_IMX_C += \
$(MCU_DIR)/drivers/fsl_lpi2c.c \
$(MCU_DIR)/drivers/fsl_lpspi.c \
$(MCU_DIR)/drivers/fsl_lpspi_edma.c \
$(MCU_DIR)/drivers/fsl_lpuart.c \
$(MCU_DIR)/drivers/fsl_pit.c \
$(MCU_DIR)/drivers/fsl_pwm.c \
$(MCU_DIR)/drivers/fsl_sai.c \
Expand Down Expand Up @@ -163,6 +164,7 @@ endif

ifeq ($(MCU_SERIES), MIMXRT1176)
INC += -I$(TOP)/$(MCU_DIR)/drivers/cm7
CFLAGS += -DCRYPTO_USE_DRIVER_CAAM -DCACHE_MODE_WRITE_THROUGH=1

SRC_HAL_IMX_C += \
$(MCU_DIR)/drivers/cm7/fsl_cache.c \
Expand Down Expand Up @@ -190,7 +192,6 @@ SRC_C += \
eth.c \
fatfs_port.c \
flash.c \
hal/fsl_lpuart.c \
hal/pwm_backport.c \
help.c \
led.c \
Expand Down
6 changes: 4 additions & 2 deletions ports/mimxrt/eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,10 @@ void eth_init_0(eth_t *self, int eth_id, const phy_operations_t *phy_ops, int ph
enet_config.txAccelerConfig = kENET_TxAccelIpCheckEnabled | kENET_TxAccelProtoCheckEnabled;
// Set interrupt
enet_config.interrupt |= ENET_TX_INTERRUPT | ENET_RX_INTERRUPT;
enet_config.callback = eth_irq_handler;
enet_config.userData = (void *)self;

ENET_Init(ENET, &g_handle, &enet_config, &buffConfig[0], hw_addr, source_clock);
ENET_SetCallback(&g_handle, eth_irq_handler, (void *)self);
NVIC_SetPriority(ENET_IRQn, IRQ_PRI_PENDSV);
ENET_EnableInterrupts(ENET, ENET_RX_INTERRUPT);
ENET_ClearInterruptStatus(ENET, ENET_TX_INTERRUPT | ENET_RX_INTERRUPT | ENET_ERR_INTERRUPT);
Expand Down Expand Up @@ -461,9 +462,10 @@ void eth_init_1(eth_t *self, int eth_id, const phy_operations_t *phy_ops, int ph
enet_config.txAccelerConfig = kENET_TxAccelIpCheckEnabled | kENET_TxAccelProtoCheckEnabled;
// Set interrupt
enet_config.interrupt = ENET_TX_INTERRUPT | ENET_RX_INTERRUPT;
enet_config.callback = eth_irq_handler;
enet_config.userData = (void *)self;

ENET_Init(ENET_1, &g_handle_1, &enet_config, &buffConfig_1[0], hw_addr_1, source_clock);
ENET_SetCallback(&g_handle_1, eth_irq_handler, (void *)self);
ENET_ClearInterruptStatus(ENET_1, ENET_TX_INTERRUPT | ENET_RX_INTERRUPT | ENET_ERR_INTERRUPT);
ENET_EnableInterrupts(ENET_1, ENET_RX_INTERRUPT);
ENET_ActiveRead(ENET_1);
Expand Down
Loading

0 comments on commit cd79071

Please sign in to comment.