Jump to content

KTP

Members
  • Posts

    3
  • Joined

  • Last visited

KTP's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. I was trying to have a thread with a function to send commands over I2C. using a queue of messages to send and the FDwfDigitalI2cWriteRead and FDwfDigitalI2cWrite functions. Are these commands thread-safe or should I lock them to make them a critical section in my code?
  2. I have bought a USB-CAN-A adapter and I want to test it with the Analog Discovery 2 that I have. https://www.waveshare.com/wiki/USB-CAN-A#Software My USB-CAN adapter has differential Can pins, so CAN_H and CAN_L. The analog discovery has the TX and RX and I'm not sure how they should connect correctly. Atm I have DIO 5 for TX connected to CAN_H and DIO 6 for RX connected to CAN_L. I have the software for the adapter sending messages to the analog discovery receiving. I'm getting all the data across but I have RX ERROR FRAME appearing on the anlaog discovery. I also have The Transmitter error count going up by 8 every time I sent a message - which according to this explanation is a primary error flag. After 16 messages the transmitter error count gets to 128 and the error shown on the software turns to Error passive, and the RX ERROR FRAME isn't flagged on subsequent messages. I'm really confused about why I'm getting these errors and how to fix them. Any help is greatly appreciated.
  3. I have an Analog Discovery 2 and I want to look at one of the staticIO pins when that pin goes high. I want to be doing other things and use the staticIO as a kind of interrupt to the code. I have used hardware interrupts in embedded C but I am know using the Python SDK. I'm wondering if there is a way do have hardware interrupts in the Python SDK? Of if there is a work around or another way to achive a similar effect? TIA
×
×
  • Create New...