Troubleshooting an Anybus CompactCom 40 in SPI mode

31 Jul 2024

This article gives possible reasons why the communication between your host controller and an Anybus CompactCom 40 (ABCC40) fails.

 

APPLICABLE PRODUCTS

Anybus CompactCom 40 in SPI mode
ABCC driver ('Host Application Example Code', HAEC)

 

ISSUE

After connecting the SPI lines MOSI/MISO/SCLK/CS of the ABCC40 with your controller and integrating the ABCC driver in your application, the initialization stops and never reaches WAIT_PROCESS state.

 

 

POSSIBLE CAUSES

  • Pull-down resistor

    Have you included a low value pull-down resistor (between 1k0 and 2k2) on the ABCC40 OM3 pin?Otherwise, the SPI operating mode won't be recognized by the ABCC40.

  • Correct OM3 pin when using Expansion Board from the ABCC Starterkit

    When using Expansion Board from the ABCC Starterkit for your prototype setup with flying wires, please make sure that you connect the pull-down to the "ASM TX/OM3" pin on header JP8.  It should not be confused with the "ASM TX" pin on JP5.

  • 3- or 4-wire SPI

    Are you using 3- or 4-wire SPI?  Only SPI mode 3 is supported if you are using a 3-wire SPI connection towards the ABCC40, whereas 4-wire SPI supports both modes 0 & 3 (this is regarding the SPI clock and phase polarity). 

    Make sure to configure the SPI master of your controller accordingly.

  • SPI clock frequency

    Although the ABCC40 supports SPI clock rates up to 20 MHz, you shouldn't try to max this out in your first test runs.  Try to stay in the 1 MHz region until you verified that the SPI communication works well.

  • Implementation of your SPI system adaptation function

    Have you implemented your system adaptation function ABCC_SYS_SpiSendReceived() in such a way that it sends out the MOSI while at the same time the MISO frame is clocked in (similar to a shift register application)? 

    By no means should the ABCC40 be interrogated by a MOSI telegram while expecting the answer in a later MISO response telegram.

  • Include pnDataReadyCbf() call

    In case you observe a MISO response from the ABCC40 in a logic analyzer, but the initialization is still not possible: maybe you forgot to include the pnDataReadyCbf() call at the end of your ABCC_SYS_SpiSendReceive() system adaptation function. 

    This call notifies the ABCC driver to process the received MISO frame.

 

ADDITIONAL INFO

Information on SPI clock polarity and phase