AnsweredAssumed Answered

LPC1769 Ethernet Bare metal

Question asked by sahakagopyan on Jan 23, 2018
Latest reply on Feb 6, 2018 by soledad



I have a custom board based on lpc1769 with ethernet.

I've seen that in LPCopen library, the ethernet driver uses the interrupts only with an RTOS.

I needed to use the ethernet with a bare-metal application, and wanted to enable the interrupt , to manage ethernet.


I modified the IRQHandler (since the default one, in the driver disables the ETH IRQ ) . I moved the packet management out of the IRQ handler.



void ETH_IRQHandler(void)

/* Interrupts are not used without an RTOS */
uint32_t ints;
uint32_t prevtick=timerTick;

ints = Chip_ENET_GetIntStatus(LPC_ETHERNET);
if (ints & RXINTGROUP) {

   struct pbuf *p;

   struct eth_hdr *ethhdr;
   int print_i;
   /* move received packet into a new pbuf */

   p = lpc_low_level_input(p_lpc_netif);
   if (p != NULL) {
if (ints & TXINTGROUP) {


Chip_ENET_ClearIntStatus(LPC_ETHERNET, ints);



My problem is that, randomly, i have droped packets, since theses are corrupted, and some time after, a hard fault appears. It happens that the Hard fault appears without any droped packet.  I suppose that i'm doing something wrong, but i don't get whey it does not work.


I assume that there is a reason why on lpcopen, the ethernet management is not done with interrupt on a bare metal system, but i can't figure out the reason.


Thx for your time  If you have any solution ? something i missed in the documentation ?