Hello,
I am trying to use an arduino pro portenta c33 with 2 TMC429.
Currently i am only trying to get the TMC429 on a breakout board(specifically the TMC429-BOB https://www.analog.com/media/en/technical-documentation/user-guides/tmc429-bob-user-manual.pdf) to communicate with the C33.
I have a 16 MHz quartz oscillator for the CLK on the breakout board as well as all SPI pins connected correctly. The TMC429 is connected in the 3,3V operating mode.
When using the “TestConnection” example that comes with the library i get this:
23:47:02.466 -> communicating: 0
23:47:02.466 -> version: 801918
23:47:02.466 -> velocity_max_upper_limit: 406051
23:47:02.498 -> setLimitsInHz: 100, 100000, 40000
23:47:02.498 -> acceleration_max: 322341919
23:47:02.498 -> acceleration_max_upper_limit: 19
23:47:02.498 -> acceleration_actual: 0
23:47:02.498 -> velocity_min: 0
23:47:02.498 -> velocity_max: 0
23:47:02.498 -> set target_velocity: -50000
23:47:02.498 -> target_velocity: 812500
23:47:02.498 -> actual_velocity: 0
23:47:02.532 -> set target_position: 12345
23:47:02.532 -> set target_position: -8388608
23:47:02.532 -> actual_position: -8388608
23:47:02.532 -> at_target_position = 1
23:47:02.532 -> at_target_velocity = 0
23:47:02.532 -> After disabling, right switches enabled = 0
23:47:02.566 -> After enabling, right switches enabled = 0
23:47:02.566 -> After disabling, switch soft stop enabled = 0
23:47:02.603 -> After enabling, switch soft stop enabled = 0
23:47:02.603 -> After disabling, left switch stop enabled = 1
23:47:02.603 -> After enabling, left switch stop enabled = 1
23:47:02.603 -> After disabling, right switch stop enabled = 1
23:47:02.644 -> After enabling, right switch stop enabled = 1
23:47:02.644 -> left_switch_active = 1
23:47:02.644 -> right_switch_active = 1
23:47:02.644 -> latch_position_waiting: 0
23:47:02.644 -> latch_position: -8388608
23:47:02.644 -> status.at_target_position_0 = 0
23:47:02.644 -> status.switch_left_0 = 1
23:47:02.681 -> status.at_target_position_1 = 0
23:47:02.681 -> status.switch_left_1 = 0
23:47:02.681 -> status.at_target_position_2 = 0
23:47:02.681 -> status.switch_left_2 = 0
It is always the same and not changing. I tried the same setup with an Arduino mega (in 3,3V and 5V mode) and I got the expected result.
I tried a bunch of things both hardware and software. I reduced the SPI transfer speed in the library and used level shifter(and some more things) but I can't get it to work.
When trying to fix the problem i took pictures of the entire communication for the “communication sketch” (tmc429.communicating()).
This one is for the working Version on the arduino mega.
and this one is a non-working exchange with C33.
Yellow --> Chip Select
Green --> Serial Clock
Blue --> COPI (MOSI)
Red --> CIPO (MISO)
On a side note: on the bottom of the picture is the decoded SPI data. I could not get it to work for the C33 Version even with adjusting the thresholds. (Also sorry for the white background, i only noticed that afterwards)
Any ideas what else i could try. (i am still waiting for higher frequency oscillator).