Skip to content

Commit cd79071

Browse files
committed
ports/mimx: Update compatibility with MCUX_2.16.100 SDK.
Signed-off-by: Andrew Leech <[email protected]>
1 parent 728f457 commit cd79071

File tree

6 files changed

+13
-2018
lines changed

6 files changed

+13
-2018
lines changed

ports/mimxrt/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ SRC_HAL_IMX_C += \
132132
$(MCU_DIR)/drivers/fsl_lpi2c.c \
133133
$(MCU_DIR)/drivers/fsl_lpspi.c \
134134
$(MCU_DIR)/drivers/fsl_lpspi_edma.c \
135+
$(MCU_DIR)/drivers/fsl_lpuart.c \
135136
$(MCU_DIR)/drivers/fsl_pit.c \
136137
$(MCU_DIR)/drivers/fsl_pwm.c \
137138
$(MCU_DIR)/drivers/fsl_sai.c \
@@ -163,6 +164,7 @@ endif
163164

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

167169
SRC_HAL_IMX_C += \
168170
$(MCU_DIR)/drivers/cm7/fsl_cache.c \
@@ -190,7 +192,6 @@ SRC_C += \
190192
eth.c \
191193
fatfs_port.c \
192194
flash.c \
193-
hal/fsl_lpuart.c \
194195
hal/pwm_backport.c \
195196
help.c \
196197
led.c \

ports/mimxrt/eth.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,10 @@ void eth_init_0(eth_t *self, int eth_id, const phy_operations_t *phy_ops, int ph
397397
enet_config.txAccelerConfig = kENET_TxAccelIpCheckEnabled | kENET_TxAccelProtoCheckEnabled;
398398
// Set interrupt
399399
enet_config.interrupt |= ENET_TX_INTERRUPT | ENET_RX_INTERRUPT;
400+
enet_config.callback = eth_irq_handler;
401+
enet_config.userData = (void *)self;
400402

401403
ENET_Init(ENET, &g_handle, &enet_config, &buffConfig[0], hw_addr, source_clock);
402-
ENET_SetCallback(&g_handle, eth_irq_handler, (void *)self);
403404
NVIC_SetPriority(ENET_IRQn, IRQ_PRI_PENDSV);
404405
ENET_EnableInterrupts(ENET, ENET_RX_INTERRUPT);
405406
ENET_ClearInterruptStatus(ENET, ENET_TX_INTERRUPT | ENET_RX_INTERRUPT | ENET_ERR_INTERRUPT);
@@ -461,9 +462,10 @@ void eth_init_1(eth_t *self, int eth_id, const phy_operations_t *phy_ops, int ph
461462
enet_config.txAccelerConfig = kENET_TxAccelIpCheckEnabled | kENET_TxAccelProtoCheckEnabled;
462463
// Set interrupt
463464
enet_config.interrupt = ENET_TX_INTERRUPT | ENET_RX_INTERRUPT;
465+
enet_config.callback = eth_irq_handler;
466+
enet_config.userData = (void *)self;
464467

465468
ENET_Init(ENET_1, &g_handle_1, &enet_config, &buffConfig_1[0], hw_addr_1, source_clock);
466-
ENET_SetCallback(&g_handle_1, eth_irq_handler, (void *)self);
467469
ENET_ClearInterruptStatus(ENET_1, ENET_TX_INTERRUPT | ENET_RX_INTERRUPT | ENET_ERR_INTERRUPT);
468470
ENET_EnableInterrupts(ENET_1, ENET_RX_INTERRUPT);
469471
ENET_ActiveRead(ENET_1);

0 commit comments

Comments
 (0)