Main Site Documentation

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


#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:


_nic.NetworkInterface.RenewDhcpLease();

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

using fix-firmware 9.2.10.3


#2

Pulses are normal as it is writing to flash.


#3

@ 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…


#4

@ RobvanSchelven -

we will check


#5

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


#6

@ RobvanSchelven -

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


#7

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


#8

@ RobvanSchelven -

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


#9

@ Dat - Ok, thanks i understand.