6 years, 11 months ago.

EthernetInterface blocks PWM signal

Hello everyone,

Background: I'm working on a project where I have to control 18 fans separately with a PWM signal and send all the control data from a PC to the control board which is connected to the fans. I have 2 codes:

  • one to test the fans, to see if they are working properly. It is a very simple code where I use the USB to control the PWM out put.
  • the other one with the EthernetInterface, to send data to control the fans through the Ethernet cable.

The problem: I created 2 arrays containing 9 fans each, when I access them with my first code (through USB) all the fans work properly, but when I tested my second code (through Ethernet), 1 fan doesn't spin. I have identified that the EthernetInterface some how blocks a certain type of PWM configuration, for example when I use this configuration:

PwmOut frontFan[9]={PB_11,PE_14,PB_8,PB_3,PB_15,PB_6,PB_13,PE_5,PC_8}; PwmOut rearFan[9]={PB_10,PE_12,PB_9,PE_11,PC_6,PD_13,PC_7,PE_6,PC_9};

The pin PB_13 doesn't out put a PWM signal, but when I use this configuration:

PwmOut frontFan[9]={PB_11,PE_14,PB_8,PB_3,PB_15,PB_6,PE_10,PE_5,PC_8}; PwmOut rearFan[9]={PB_10,PE_12,PB_9,PE_9,PC_6,PD_13,PC_7,PE_6,PC_9};

Every fan spins properly (the difference are in bold). Is there a bug in the EthernerInterface library ? Is there a work around ?

I would like to keep the first configuration, because I already printed a shield for the board.

Control board: NUCLEO-F429ZI https://developer.mbed.org/platforms/ST-Nucleo-F429ZI/

Using mbed-os EthernetInterface library

1 Answer

6 years, 11 months ago.

It's most likely caused by a hard-coded use of PB13 for ETH_MII_TXD1. Check the Nucleo board and see if the alternate pin (PG14) can be used by changing a solder-bridge (resistor). If it exists you might just need to go into the code and change the ETH_MII_TXD1 to use the alternate pin. If not you could make a wiring change to the Nucleo board and correct the issue.

Accepted Answer