cancel
Showing results for 
Search instead for 
Did you mean: 

Issue using LwIP (netconn) with CMSIS-DSP on Nucleo F767

AHann.1
Associate

I'm trying to get my board set up to receive data via UDP, run an FFT and then return the data back to the requesting port, I receive and echo back data but as soon as I try to process it with the FFT function the system locks up waiting for a memory semaphore to clear after calling netbuf_new(). Additionally, it seems all the netconn variables are messed up after running the FFT, they show sensible values at the start but after the FFT is run they get changed or cleared. This does not occur if don't run the FFT and instead fill the array with dummy data.

/* Perform the FFT*/
 
		arm_rfft_f32(&RealFFT_Instance, (float32_t*) procDat,
				(float32_t*) outDat);
 
		/* Dummy data generation */
/*		for (int i = 0; i < LENGTH_SAMPLES; i++) {
			outDat[i] = i;
		}*/
 
		/* Create new netbuf for return data*/
		out = netbuf_new();   // Fails in here
		if (out == NULL) {
			exit(-1);
		}
		
		buf = netbuf_alloc(out, LENGTH_SAMPLES * sizeof(uint32_t));

Any suggestions on what could be causing this would be appreciated, thanks.

1 REPLY 1
Piranha
Chief II

First, read this carefully: https://community.st.com/s/question/0D50X0000BOtfhnSQB/how-to-make-ethernet-and-lwip-working-on-stm32

Second, it's not clear from where is this code called and if RTOS is used. Most likely exactly like in ST's and other bad examples you are also ignoring lwIP multithreading requirements...