itsybitsy M4 compile issue

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dickiefixit
 
Posts: 2
Joined: Fri Sep 09, 2022 5:52 am

itsybitsy M4 compile issue

Post by dickiefixit »

Using Arduino IDE my sketch compiles when I am using an itsybitsy M0. I changed to an itsybitsy M4 for the floating point support, but now the sketch does not compile. It fails with multiple lines like this...

Code: Select all

C:\Users\Richard\Documents\Arduino\libraries\Simple_FOC\src\drivers\hardware_specific\samd51_mcu.cpp:32:17: error: 'TC4_CH1' was not declared in this scope; did you mean 'TC3_CH1'?
   32 |   { PORTB,   9, TC4_CH1,   1, NOT_ON_TIMER,  0, NOT_ON_TIMER,  0},
I can't find where the #define is for PORTB or TC3_CH1 for instance.
Can anybody help out here please?

User avatar
blnkjns
 
Posts: 963
Joined: Fri Oct 02, 2020 3:33 am

Re: itsybitsy M4 compile issue

Post by blnkjns »

It seems you run into small differences in pin capabilities, timers or interrupts. Why do you address a pin by its raw port number and not arduino pin numbers?

User avatar
dickiefixit
 
Posts: 2
Joined: Fri Sep 09, 2022 5:52 am

Re: itsybitsy M4 compile issue

Post by dickiefixit »

The error occurs in a file in the Simple_FOC library and I'm not sure what it's all about. I am using Simple_FOC to read a AS5048A magnetic sensor which works very well when I compile for itsybitsy M0 but throws up these errors when I compile for itsybitsy M4. So I think I'm looking for an error in Adafruit hardware definition files somewhere.

User avatar
blnkjns
 
Posts: 963
Joined: Fri Oct 02, 2020 3:33 am

Re: itsybitsy M4 compile issue

Post by blnkjns »

The sensor is SPI, but maybe SPI does not work well behind SimpleFOC. What if you read the sensor directly?
Beware that SPI is on the ICSP header, and not on "SPI pins" usually found in wrongly written UNO tutorials.

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”