socware-net / hyperCOS-evaluate

Other
3 stars 2 forks source link

brd: HOW to send/receive non TCP/IP packet using LWIP on stm32f4 #6

Open socware-net opened 6 years ago

socware-net commented 6 years ago

From @hvz2015 on June 30, 2016 6:50

hi i need to get some packets from eth interface i am trying to receive some (non TC/IP) packets from eth interface using Lwip library in intrrupt mode (not polling!).

I enabled NVIC Ethernet global interrupt and used this the callback but it never runs (GPIO_PIN_12 never toggles!)

//--------------------------------- void ETH_IRQHandler(void) { /* USER CODE BEGIN ETH_IRQn 0 */

/* USER CODE END ETHIRQn 0 / HAL_ETHIRQHandler(&heth); / USER CODE BEGIN ETHIRQn 1 / /_ USER CODE END ETH_IRQn 1 */ }

void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef _heth) { HAL_GPIO_TogglePin(GPIOD, GPIO_PIN12); } *//---------------------------------**

by the way i am able to send non tpc/ip packets via this function :

int16_t f4x7_frame_push(ETH_HandleTypeDef heth, uint8_t buf, uint16_t len) { uint8_t buffer = (uint8_t )(heth->TxDesc->Buffer1Addr);

/* copy frame from local buf to DMA buffers */
memcpy(buffer, buf, len);

/* Prepare transmit descriptors to give to DMA*/
if (HAL_ETH_TransmitFrame(heth, len) != HAL_OK)
    return 0;

return len;

}

Copied from original issue: ibanezchen/hyperCOS-evaluate#42

socware-net commented 6 years ago

From @ibanezchen on June 30, 2016 8:50

We are planning to support stm32f4 board and we would like the collect the user requirements. It would be great if you can post this issue on the mailinglist: http://www.freelists.org/list/hypercos