G120 SPI 2 clock affected by RenewDhcpLease while ENC28 on SPI 1

Looks like a bug…

having …

_nic = new EthernetENC28J60(SPI.SPI_module.SPI1, Pin.P1_5, Pin.P0_1, Pin.P0_10, 10000);

using somewhere in the code:


calling RenewDhcpLease() generates pulses on the clock line of SPI2 while ENC28 is connected to SPI 1

using fix-firmware

Pulses are normal as it is writing to flash.

@ Gus - I am not sure if i can agree… if the pin of the MCU is defined as SPI clock and its state will change because of flash writes, what will happen with a pin that is defined as a select signal for an external chip…

@ RobvanSchelven -

we will check

I just realized that you are talking about SPI1 and SPI2! We will look into it.

@ RobvanSchelven -

it looks like NAB (Not A Bug) because this pins is highly recommend for SPI only.

@ Dat - Ok… i will try to send you sample code.

@ RobvanSchelven -

RenewDhcpLease will change the config then it will be saved to flash using SPI2. That is why you can see pules there.

@ Dat - Ok, thanks i understand.