fixed the bug of OPCUA free buffer and uart not response
This commit is contained in:
@@ -99,7 +99,7 @@ void ethernetif_clk_init(void)
|
||||
{
|
||||
const clock_enet_pll_config_t config = {.enableClkOutput = true, .enableClkOutput25M = false, .loopDivider = 1};
|
||||
CLOCK_InitEnetPll(&config);
|
||||
SysTick_Config(USEC_TO_COUNT(1000U, CLOCK_GetFreq(kCLOCK_CoreSysClk)));
|
||||
SysTick_Config(SystemCoreClock / TICK_PER_SECOND);
|
||||
}
|
||||
|
||||
void ethernetif_gpio_init(void)
|
||||
@@ -109,9 +109,7 @@ void ethernetif_gpio_init(void)
|
||||
IOMUXC_EnableMode(IOMUXC_GPR, kIOMUXC_GPR_ENET1TxClkOutputDir, true);
|
||||
|
||||
GPIO_PinInit(GPIO1, 3, &gpio_config);
|
||||
GPIO_PinInit(GPIO1, 10, &gpio_config);
|
||||
/* pull up the ENET_INT before RESET. */
|
||||
GPIO_WritePinOutput(GPIO1, 10, 1);
|
||||
GPIO_WritePinOutput(GPIO1, 3, 0);
|
||||
enet_delay();
|
||||
GPIO_WritePinOutput(GPIO1, 3, 1);
|
||||
|
||||
@@ -41,11 +41,9 @@ void LPUART1_IRQHandler(int irqn, void *arg)
|
||||
{
|
||||
x_base lock = 0;
|
||||
// KPrintf("LPUART1_IRQHandler \n");
|
||||
lock = DISABLE_INTERRUPT();
|
||||
|
||||
lock = DisableIRQ(UART1_IRQn);
|
||||
UartIsr(&serial_bus_1, &serial_driver_1, &serial_device_1);
|
||||
|
||||
ENABLE_INTERRUPT(lock);
|
||||
EnableIRQ(UART1_IRQn);
|
||||
}
|
||||
DECLARE_HW_IRQ(UART1_IRQn, LPUART1_IRQHandler, NONE);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user