0

difference between feather 32u4 and feather M0
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

difference between feather 32u4 and feather M0

by DrEco on Mon Jun 06, 2022 12:30 am

I use a feather to control a MIKROE ADC 6 click, 24b 8ch.
All works well with a feather 32u4 [sig proc + RTC+SD+ADC] , but I need to add
some more user interface and the 32u4 is maxed out.
When I load a feather Mo.....all is well with the sig proc, RTC, SD, but the ADC is stuck at
a max reading. No errors listed, is this maybe a speed issue or ??? or is there some difference I'm not seeing?

DrEco
 
Posts: 5
Joined: Thu Apr 17, 2014 7:35 pm

Re: difference between feather 32u4 and feather M0

by tepalia02 on Mon Jun 06, 2022 8:46 am

Hi, I can see there are some differences between the two boards. Which pin of the M0 are you using for your ADC connection?

tepalia02
 
Posts: 104
Joined: Sun Apr 24, 2022 6:53 am

Re: difference between feather 32u4 and feather M0

by DrEco on Tue Jun 21, 2022 4:13 pm

I interface with the ADC module via SPI.
Seems to work fine when using a 32u4 but I get a lot of errors when I change to a M0...?
Is there a potential coding or compile issue here ..?

DrEco
 
Posts: 5
Joined: Thu Apr 17, 2014 7:35 pm

Re: difference between feather 32u4 and feather M0

by adafruit_support_carter on Tue Jun 21, 2022 6:40 pm

The Feather form factor provides the main SPI pins SCLK, MOSI, and MISO in a common location. So shouldn't need to change anything for those.

The chip select (CS) pin can be any available GPIO pin though. What pin was being used on the 32u4 for chip select?

adafruit_support_carter
 
Posts: 24078
Joined: Tue Nov 29, 2016 2:45 pm

Re: difference between feather 32u4 and feather M0

by DrEco on Wed Jul 06, 2022 12:45 am

I'm getting an error I don't understand...??

" invalid conversion from 'uint8_t' {aka 'unsigned char'} to 'BitOrder' [-fpermissive]
95 | SPI.beginTransaction (SPISettings (speedMaximum, dataOrder, dataMode));
| ^~~~~~~~~
| |
| uint8_t {aka unsigned char} ""

I don't get this error when using a Feather 32u4, but I do get it when loading the same file to a Feather M0.....
Is there an easy fix for this..??

DrEco
 
Posts: 5
Joined: Thu Apr 17, 2014 7:35 pm

Re: difference between feather 32u4 and feather M0

by adafruit_support_carter on Wed Jul 06, 2022 12:11 pm

That's a difference between the Arduino Board Support Packages for the 32u4 (AVR) and M0 (ARM).

If that line is in a library, then the library should be updated. Should be a simple fix. It's basically griping about the variable types being used.

adafruit_support_carter
 
Posts: 24078
Joined: Tue Nov 29, 2016 2:45 pm

Re: difference between feather 32u4 and feather M0

by DrEco on Wed Jul 06, 2022 6:49 pm

OK I use the same code for both 32u4 and M0
/* constants ================================================================ */
const int ledPin = 9; // ADC sample interval
const int ssPin = 10; // ADC enable/strob
double G = 1.08000; // Global gain adjust
double Os = 0.000350; // Global Offset adjust
const int chipSelect = 4; // SD card strob

I get this error just for the M0 platform...?
"" error: invalid conversion from 'uint8_t {aka unsigned char}' to 'BitOrder' [-fpermissive]
SPI.beginTransaction (SPISettings (speedMaximum, dataOrder, dataMode)); ""

DrEco
 
Posts: 5
Joined: Thu Apr 17, 2014 7:35 pm

Re: difference between feather 32u4 and feather M0

by adafruit_support_carter on Wed Jul 06, 2022 6:57 pm

Post more lines of the output. The lines above that message should indicate what file is making the call to SPI.beginTransaction ().

adafruit_support_carter
 
Posts: 24078
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.


cron