rusefi / rusefi

rusefi - GPL internal combustion engine control unit
http://rusefi.com
Other
790 stars 250 forks source link

Enable ethernet on F429 discovery #4664

Open rusefillc opened 2 years ago

rusefillc commented 2 years ago

Subj

rusefillc commented 2 years ago

See https://github.com/rusefi/rusefi/pull/3348

rusefillc commented 2 years ago

FYI some fun code

#ifndef STM32H7
    // TODO: why does this break H7? I thought the pins were the same?
    efiSetPadMode("ethernet",  Gpio::A1, PAL_MODE_ALTERNATE(0xb));
    efiSetPadMode("ethernet",  Gpio::A2, PAL_MODE_ALTERNATE(0xb));
    efiSetPadMode("ethernet",  Gpio::A7, PAL_MODE_ALTERNATE(0xb));

    efiSetPadMode("ethernet",  Gpio::C1, PAL_MODE_ALTERNATE(0xb));
    efiSetPadMode("ethernet",  Gpio::C4, PAL_MODE_ALTERNATE(0xb));
    efiSetPadMode("ethernet",  Gpio::C5, PAL_MODE_ALTERNATE(0xb));

    efiSetPadMode("ethernet",  Gpio::D5, PAL_MODE_ALTERNATE(0xb));

    efiSetPadMode("ethernet", Gpio::G11, PAL_MODE_ALTERNATE(0xb));
    efiSetPadMode("ethernet", Gpio::G13, PAL_MODE_ALTERNATE(0xb));
    efiSetPadMode("ethernet", Gpio::G14, PAL_MODE_ALTERNATE(0xb));
#endif // STM32H7
rusefillc commented 2 years ago

Hold on that board does not have Ethernet? https://www.emcraft.com/stm32f429discovery/connecting-to-ethernet-on-stm32f429

Have we confused with Nucleo? See #4665