cancel
Showing results for 
Search instead for 
Did you mean: 

SPC58 Ethernet

AlexanderSmith
Associate II

Hello!
I am studying the SPC58NH92E7. My chose of MCU is driven by the need to have two Fast Ethernet transceivers operating simultaneously.

I'm looking for baremetal (no OS) example for 100BASE-TX. Has anyone come across examples like this? I couldn't one among the standard examples in SPC5Studio without FreeRTOS.
The standard approach in SPC5Studio is to use FreeRTOS. I have tried with FreeRTOS + RMII PHY. It's work correctly. Next step - baremetal application with ethernet promiscuous mode. I need to receive simple IPv4 UDP packets.

And another question. Where can I find documentation for components/spc5_network_components_rla? "Generate SPC5 Application" doesn't generate any documentation for this. No "doc" folder inside "spc5_network_components_rla".

4 REPLIES 4
AlexanderSmith
Associate II

I have reviewed application note AN5413. In my case network_raw.h and NetworkInterfaceRaw.c files were also generated (AN5413 doesn't provide a description of these files). I'm looking for any information about this. I think that network raw API will be helpful in my case. SPC5Studio doesn't generate any documentation for this.

AlexanderSmith
Associate II

Examining the source code of the network libraries helped me partially resolve the issue without any documentation.
I had to manually modify the file spc5_network_component_rla/mak/component.mak
There must be a setting somewhere that allows you to choose which option to use (with or without an operating system). But I couldn’t find such a setting.
In the spc5_network_component_rla/lib/include/network.h file, I commented out the line //#define HAS_OS CONFIG_FREERTOS
I couldn't find a definition for CONFIG_FREERTOS in the library source code files. I think the IDE adds it implicitly.

I can send packages using the function rawNetworkInterfaceOutput(). But can't receive any data via ethernet_consume_rx_buffer() callback.

I'm still looking for examples.

AlexanderSmith
Associate II

I think that I find some issue in dwmac_pltf.c (this file is a part of SPC5 Network Component RLA).
In function dwmac_platform_init() there no calling spc5_set_eth0_clock(). There is only for eth1.
It was problem if you using eth0 only and external clock.

if (index == SPC5_ETH0_INSTANCE) {
#if( SPC5_USE_ETH0 == TRUE )
spc5_set_eth0_interface(SPC5_ETH0_MODE);
spc5_set_eth0_voltage_sel(SPC5_ETH0_VOLTAGE);
#endif
} else if (index == SPC5_ETH1_INSTANCE) {
#if( SPC5_USE_ETH1 == TRUE )
spc5_set_eth1_interface(SPC5_ETH1_MODE);
spc5_set_eth1_voltage_sel(SPC5_ETH1_VOLTAGE);
spc5_set_eth1_clock(SPC5_ETH1_CLOCK_SOURCE);
#endif
}

 

AlexanderSmith
Associate II

And another issue in dwmac_drv_helper.h (this file is a part of SPC5 Network Component RLA). Lost closing round bracket symbol in function dwmac_isr_helper(). Only for undefined HAS_OS.

static inline void dwmac_isr_helper(dwmac_qos_t * dwmac, uint32_t DMA_Irq_status)
{
	(void dwmac;
	(void) DMA_Irq_status;
}

 

Announcement

We’re moving the ST Community to a new platform to give you a better and more reliable community experience.