cancel
Showing results for 
Search instead for 
Did you mean: 

ST67W6X Network Driver porting to another processor

ChrisAlfred
Associate II

We have successfully tested the  ST67W6X Network Driver CLI example on a NUCLEO-U575ZI-Q with X-NUCLEO-67W61M1 development boards.

We would like to port the example to an STM32F746.

However, this is not simple due to the tight timing constraints required by the ST67W6x - e.g. the examples utilise the advanced SPI DMA available in the STM32U5xx family.

Searching the internet shows other developers noticing dropped data on other processors. There are also reports that the following requirements must be met:

  • Respond within ~30us of SPI_RDY going high
  • No breaks of more than ~2-3us in the DMA while streaming the SPI data.

Do you have an example port for the STM32F746? Or at least on a processor with similar limited DMA capabilities? 

1 ACCEPTED SOLUTION

Accepted Solutions
EPASZ.1
ST Employee

The attached project works well on the F746 Nucleo board. In general, it is still a simple SPI protocol, advanced DMA is not needed. It even works without DMA, if the processor is free to manage the transfers.

Can you point out the some of the messages / sites which show the issues which you mentioned?

"

Searching the internet shows other developers noticing dropped data on other processors. There are also reports that the following requirements must be met:

  • Respond within ~30us of SPI_RDY going high
  • No breaks of more than ~2-3us in the DMA while streaming the SPI data.

"

View solution in original post

3 REPLIES 3
EPASZ.1
ST Employee

The attached project works well on the F746 Nucleo board. In general, it is still a simple SPI protocol, advanced DMA is not needed. It even works without DMA, if the processor is free to manage the transfers.

Can you point out the some of the messages / sites which show the issues which you mentioned?

"

Searching the internet shows other developers noticing dropped data on other processors. There are also reports that the following requirements must be met:

  • Respond within ~30us of SPI_RDY going high
  • No breaks of more than ~2-3us in the DMA while streaming the SPI data.

"

I am trying to port this to the STM32F746G-DISCO. To do this, I had to redefine the pins in CubeMX and add X-CUBE-ST67W61.

When I compile in CubeIDE, __get_IPSR() is undefined. I notice in your example the check for tskKERNEL_VERSION_MAJOR is missing.

There are 3 sections like below in spi_iface.c:

 

#if ((tskKERNEL_VERSION_MAJOR > 10) || ((tskKERNEL_VERSION_MAJOR == 10) && (tskKERNEL_VERSION_MINOR >= 6)))

if (xPortIsInsideInterrupt())

#else

if (__get_IPSR() != 0U)

#endif /* tskKERNEL_VERSION_MAJOR */

 

ChrisAlfred
Associate II

For those of you trying to get this going on the STM32F746G-DISCO with X-NUCLEO-67W61M1:

  • Disconnect Ext32k_U5 signal on X-NUCLEO-67W61M1 by unshorting SB56
  • Put the attached F746_disco.ioc in an empty directory
  • Open the attached F746_disco.ioc in CubeMX and click GENERATE_CODE
  • Import the generated code into CubeIDE

Unfortunately, the code needs to be modified to compile.

appli/App/app_config.h

  • Change WIFI_SSID
  • Change WIFI_PASSWORD
Core/Src/main.c
  /* USER CODE BEGIN 2 */
  MX_SPI2_Init();
  MX_USART6_UART_Init();
  /* USER CODE END 2 */
 
Fix compilation missing if (__get_IPSR() != 0U) in MiddleWares/ST/ST67W6X_Netowrk_Driver/Driver/W61_bus/spi_iface.c, change 3 instances:
//#if ((tskKERNEL_VERSION_MAJOR > 10) || ((tskKERNEL_VERSION_MAJOR == 10) && (tskKERNEL_VERSION_MINOR >= 6)))
    if (xPortIsInsideInterrupt())
//#else
//    if (__get_IPSR() != 0U)
//#endif /* tskKERNEL_VERSION_MAJOR */
 Now the project should compile, build and run on Disco board.
The serial output is sent on USART6_TX (Pin 2 of CN4).