cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743 CubeMX 4.23.0 FreeRTOS LwIP (UDP) hangs

Joerg Wagner
Senior III
Posted on January 04, 2018 at 12:09

Hello.

I have a simple SW4STM32 project just using FreeRTOS and LwIP on NUCLEO-H743ZI.

Initialize UDP in a task with:

  struct netconn *conn_udp;

  conn_udp = netconn_new(NETCONN_UDP);

FreeRTOS hangs forever in portmacro.h:

portFORCE_INLINE static void vPortRaiseBASEPRI( void )

{

uint32_t ulNewBASEPRI;

    __asm volatile

    (

        '    mov %0, %1                                                \n'    \

        '    cpsid i                                                    \n' \

        '    msr basepri, %0                                            \n' \

        '    isb                                                        \n' \

        '    dsb                                                        \n' \

        '    cpsie i                                                    \n' \

        :'=r' (ulNewBASEPRI) : 'i' ( configMAX_SYSCALL_INTERRUPT_PRIORITY )

    );

}

.data/.bss are in D1 domain, ETH Descriptors are in D2 domain, RMII GPIO Pins corrected,

no DCACHE (   //SCB_CleanInvalidateDCache(); in ethernetif.c ), MPU is configured

I had so many 'Hard Faults' during  MX_LWIP_Init(); in a similar project, concerning FreeRTOS (semaphores, mutexes)

My advice: Do not use CubeMX 4.23.0 with NUCLEO-H743ZI or you love to kill time.

PS: I can provide the project files if someone is interested.

1 ACCEPTED SOLUTION

Accepted Solutions
Joerg Wagner
Senior III
Posted on January 08, 2018 at 23:20

This my bad.

I guess I converted a NO_SYS project into RTOS.

In MX_LWIP_Init() was a

  /* Initilialize the LwIP stack without RTOS */

  lwip_init();

but it must be

  /* Initilialize the LwIP stack with RTOS */

  tcpip_init( NULL, NULL );

Sorry.

View solution in original post

1 REPLY 1
Joerg Wagner
Senior III
Posted on January 08, 2018 at 23:20

This my bad.

I guess I converted a NO_SYS project into RTOS.

In MX_LWIP_Init() was a

  /* Initilialize the LwIP stack without RTOS */

  lwip_init();

but it must be

  /* Initilialize the LwIP stack with RTOS */

  tcpip_init( NULL, NULL );

Sorry.