Hi everyone,
I write here the experience I have acquired in recent days on Arduino GIGA.
DualCore and use of the CoProcessor:
the use of the M4 CoProcessor is limited in terms of connections.
The M4 does not have access to any serial port, not even the internal ones for communication with the serial monitor, so the UART7 port to which the WIFI/BLE modem is connected does not work on the M4 core (I have not yet tested the WiFi, but for the BLE I'm 100% sure).
Various topics have been opened on the Arduino Forum and on GitHub which have not yet received any response from the developers.
GitHub BLE Library Problem: This
GitHub ArduinoCore Problem: This
Arduino Forum problem: This
In my opinion, it would be appropriate to be able to choose the SPI port in the SD library to create shields more easily for the Arduino Giga.
currently the SD library uses the SPI1 port which is found in the pins in the center of the card, instead of the SPI5 port which is found together with all the other pins on the card.
GitHub issues: This
an issue affecting BLE when using GPS's SparkFun library.
I still can't understand whose problem it is, whether it's the BLE library or the SparkFun, it would be very useful to be able to have a debug on the serial port of what happens inside the BLE/WIFI chip for faster troubleshooting .
I will continue to do tests to understand if it is a problem related to the UART ports by trying to interface with the sensors via I2C.
In the meantime, I'll leave you all the links to the open topics.
GitHub SparkFun Problem: This
my GitHub to try to fix the problem: This
topic of the Italian forum of the problem: This
I hope this material can be useful to someone, I think I will continue to update the topic with new discoveries.
If you want to support me in solving these problems you will be welcome and you will all have my love
Where I have been trying to understand how the M7 and M4 works.
Two parts here:
Hardware Serial ports: It appears like you can actually talk to some if not all of the Hardware Serial ports. However there is an issue that the baud rate is not being set properly.
I tried configuring Serial1 to 1000000 and it appears like it is outputting at about 640000
I believe it is related to the information in the thread:
USB Serial (Serial) - They have an RPC setup, where you can do RPC.printf() on the M4 sketch and detect that on the M7 sketch RPC.available() where you can then have the M7 output it for you...
It is a pain as if you call Serial.print() on M4, the sketch is dead.
You can probably use the SDFat library ( greiman/SdFat: Arduino FAT16/FAT32 exFAT Library (github.com))
Which you can install using the library manager. I have not tried it yet with the GIGA.
Not that it helps you here, but the Teensy version of the SD library is a thin wrapper of SDFat, and I know there are examples showing how to use SPI1.
Thank you so much for your reply, I'm truly grateful.
I had read about the problem with the M4 clock but I thought it didn't affect the serials, I didn't read well!
This therefore explains why BLE doesn't work and you have "access" to the serial ports.
I had a doubt that something wasn't working correctly on the M4 because I was trying to read the serial1 and send the data to the M7 to print them on the serial monitor, but the only thing I could read were some totally incomprehensible and meaningless symbols.
now I find the similarity of when you programmed with the old Arduino IDE using the first versions of Arduino uno, if you made a mistake in selecting the serial monitor bound the same incomprehensible characters came out!
however the fact remains that I don't know where to put my hands to fix it. I think I'll have to wait for the new update, unless Arduino inserts a guide soon to solve the problem, waiting for the new version.
I will definitely try this library, even if I don't currently know what Teensy is...
I'll inform you!
thank you very much indeed <3