CAN 20260D vs 20260N (solved)

This line works fine on SCM20260D (dev. board)

Canpool.can1 = CanController.FromName(SC20260.CanBus.Can1);

But on existing hardware where we replaced G120 with SCM20260N i get an exception:

#### Exception System.InvalidOperationException - CLR_E_INVALID_OPERATION (5) ####
#### Message: 
#### GHIElectronics.TinyCLR.Devices.Can.Provider.CanControllerApiWrapper::Acquire [IP: 0000] ####
#### GHIElectronics.TinyCLR.Devices.Can.Provider.CanControllerApiWrapper::.ctor [IP: 0015] ####
#### GHIElectronics.TinyCLR.Devices.Can.CanController::FromName [IP: 000c] ####
#### MFC_SC.Canpool::CAN1_init [IP: 00df] ####
#### MFC_SC.Canpool::CAN1_pre_init [IP: 0196] ####
#### MFC_SC.Variables::ExecLine [IP: 1ef4] ####
#### MFC_SC.Variables::ExecLines [IP: 007b] ####
#### MFC_SC.ExecPool::ExecThread [IP: 017b] ####

Exception thrown: ‘System.InvalidOperationException’ in GHIElectronics.TinyCLR.Devices.Can.dll

Is there a difference from software vieuw between these 2 SOM’s ?

Both boards run 2.1.0.6500 and are in USB debug mode, same code deployed from Visual Studio.

Root cause:

On the dev board RS232 was disabled but on the upgraded hardware this was set to UART4 (same pins as CAN), changing this to UART7 (the G120 COM4) is fixing this.

3 Likes