blhost with CAN without companion board

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

blhost with CAN without companion board

611件の閲覧回数
flexeos
Contributor II

Hello

We are evaluating a MCXN-series microcontroller and our need is using rom bootloader to program flash through CAN bus

We analyzed blhost documentation and we intended that to use CAN bus it is necessary to use a companion board such as TWR-SER to interface PC serial port to CAN bus. On the other hand it seems that I2C or SPI peripherals can be used directly if PC is natively equipped with these peripherals.

We wonder if the same approach is possible also with CAN bus. In other words is it possible to interface blhost directly with CAN peripheral when this is available in the host PC ?

If this approach is possible I kindly ask you if this feature has already been developed and available for test and integration

 

Thanks in advance

 

 

 

0 件の賞賛
返信
1 返信

589件の閲覧回数
nxf46245
NXP Employee
NXP Employee
Hello,
yes, it is possible to use the CAN bus as an interface for blhost. The support is based on python-can library. Take a look at supported hardware interfaces: https://python-can.readthedocs.io/en/stable/interfaces.html I have tried it with Peak-System PCAN USB adapter.

CAN might be used with -cb/--can interface option with blhost.
-cb, --can interface[,channel,bitrate,rxid,txid]
CAN Bus settings

interface[,channel,bitrate,rxid,txid]
- interface ... CAN interface name (refer to python-can library)
- channel ... CAN channel number
- bitrate ... CAN bitrate (default=1000000)
- rxid ... default arbitration ID for RX (default=0x123)
- txid ... default arbitration ID for TX (default=0x321)

For example in case of PCAN, the interface name would be pcan, so the full command to get-property 1 using the PCAN can interface is.

blhost --can pcan get-property 1

Please note that SPSDK must be installed with "can" extras like this: pip install spsdk[can] https://spsdk.readthedocs.io/en/latest/examples/_knowledge_base/installation_guide.html#can-support
0 件の賞賛
返信