|
Post by Admin on Apr 16, 2021 13:00:15 GMT
Please check the CCUCON1 value! Should be 0x21120213. You have 0x21120013. This mistake was corrected in the latest ShieldBuddy TC375 add-in release 1.91.
/* Fcpu=300/Fsys=100 MHz @ 20MHz ext. clock */ static const PllInitValue_t g_PllInitValue_300_100 = { /* OSCCON, SYSPLLCON0, SYSPLLCON1, CCUCON0, CCUCON1, CCUCON2, finalK, PERPLLCON0, PERPLLCON1 */ 0x0005001C, 0x41057600, 0x00000005, 0x17230133, 0x21120213, 0x00001201, 1, 0x00053E00, 0x00000101 };
|
|
|
Post by crazydoc on Apr 17, 2021 19:45:24 GMT
Thank you so mutch!!! This was the problem. But I had to rewrite the register by hand. The installation file does not overwrite the "system_tc37x.c"!
I have now also integrated several HX711s. To complete my porting, I still have to write a structure of several double variables into the EEPROM. With the Arduino Mega, I realised this with the help of an eep file. #include <EEPROM.h>
struct Prog_Daten { double SpringConstantStored; double SwingweightDeviceStored; double WeightRef1Stored; double WeightRef2Stored; double WeightRef3Stored; double SensorStored; };
Prog_Daten eemDaten EEMEM {20000.00, 22.00, 20000.00, 20000.00, 20000.00, 10.00}; // struktur im EEPROM, Arduino erzeugt *.eep Datei Prog_Daten ramDaten; // struktur im RAM Write or read as required in the code (of course only once for calibration routines)
EEPROM.get((int)&eemDaten, ramDaten); EEPROM.put((int)&eemDaten, ramDaten);
Unfortunately, this does not work on the buddy. Is there a simple way to read and write floating point numbers directly into the non-volatile memory?
Many thanks!
|
|