heliflieger / a-culfw

Alternative culfw
Other
124 stars 64 forks source link

CUBe resets on RF reception if connected to USB and Ethernet simultaneously #36

Open CarlosDerSeher opened 10 months ago

CarlosDerSeher commented 10 months ago

If the MAX! CUBe is powered through an USB port of my Computer and connected through LAN, so it can be controlled using homegear on a RPi in my home network. That's my setup, at least for testing, Final power supply should be a USB port of another Raspberry at an other location but I assume these resets will happen there too. every time a radio packet from MAX! devices is received. There is no connection established to the serial port, USB is just used as a power supply. Log looks like this

-I- Getting new Started Project -- -I- CUBe -I- Compiled: Sep 8 2023 20:46:57 -- -I- init Flash -I- Initializing the SPI and AT45 drivers -I- At45 enabled -I- SPI interrupt enabled -I- Waiting for a dataflash to be connected ... -I- AT45DB041D detected -I- Device identifier: 0x0000241F -I- EE Magic: 1 26 Start 792 -I- Flash Serial: 3290944f -I- init Timer -I- init EEprom -I- - MAC 0:80:41:90:94:4f -I- ** Valid PHY Found: 1 -I- DM9161_ResetPhy -I- init USB -I- CDCDSerialDriver_Initialize USBD_Init -I- PMC_EnablePeripheral: clock of peripheral 6 is already enabled -I- init Complete Res EoBRes CfgEpt0 NewReq Std gDesc Dev EoBRes CfgEpt0 NewReq Std sAddr SetAddrd -I- AutoNegotiate complete -I- EE_W A:69 V:c0 -I- EE_W A:6a V:a8 -I- EE_W A:6b V:01 -I- EE_W A:6c V:= -I- - IP : 192.168.1.7 -I- - Mask : 255.255.255.0 -I- - GW : 192.168.1.15 -I- - DNS : 192.168.1.15 0:Set RF mode to 1 0:Set RF mode to 3

Maybe you guys (@heliflieger, @Scyten, @spezifanta) know how to proceed from here as I found most of the additional steps to compile FW (ubuntu 23.10) at your forks.

Couple things I tried but the only solution making it stable was to set display_channel = 0 in main.c. Not sure what this does exactly but it seems to me it just disables the UART data over USB (CDC?), while this solution is good enough for me, it does not solve the underlying problem I guess. Maybe someone else got an idea where to look for? It seems to me like the WDT triggers for some reason. Tried to increase it to 16s but to no avail...