ECIO40P16 and Programatically Changing the Clock Speed
Posted: Sun Feb 26, 2017 2:22 am
I'm using an ECIO40P16 module to train a college student, the project involving a range of I2C coupled sensors, TTL232 to a radio module, battery charging circuit, and batteries.
To characterise sensor responses for later embedded settings, the first phase will be to USB-program and power the ECIO module from Vbus in the conventional way, allowing sensors data to be rapidly sampled and streamed via USB to the host computer for analysis. For this purpose, all default ECIO40P16 register settings can remain of-course.
The problem is then powering the unit from batteries (normal operating mode) following sensor characterisation, where a 140MHz PLL-multipled clock (ECIO configuration) will consume excessive battery current. Running on batteries, USB will no longer be required, but there'll be a need to switch back-and-forth between batteries and USB/Vbus as the project develops. It would arguably be possible to use two ECIO40P16 modules - one dedicated to USB characterisation and the other for ICSP programming, but the PCB socket for the ECIO module will doubtless be worn out before finished.
So as not to trash the bootloader (and therefore the default ECIO configuration supporting USB) by ICSP programming, I could perhaps disable the PLL to run at the Xtal speed of 8MHz by a start-up register mod in a C block, but can I also programatically declare the reduced clock speed to Flowcode (which remains greyed-out) from within the project?
Many thanks,
Brendan
To characterise sensor responses for later embedded settings, the first phase will be to USB-program and power the ECIO module from Vbus in the conventional way, allowing sensors data to be rapidly sampled and streamed via USB to the host computer for analysis. For this purpose, all default ECIO40P16 register settings can remain of-course.
The problem is then powering the unit from batteries (normal operating mode) following sensor characterisation, where a 140MHz PLL-multipled clock (ECIO configuration) will consume excessive battery current. Running on batteries, USB will no longer be required, but there'll be a need to switch back-and-forth between batteries and USB/Vbus as the project develops. It would arguably be possible to use two ECIO40P16 modules - one dedicated to USB characterisation and the other for ICSP programming, but the PCB socket for the ECIO module will doubtless be worn out before finished.
So as not to trash the bootloader (and therefore the default ECIO configuration supporting USB) by ICSP programming, I could perhaps disable the PLL to run at the Xtal speed of 8MHz by a start-up register mod in a C block, but can I also programatically declare the reduced clock speed to Flowcode (which remains greyed-out) from within the project?
Many thanks,
Brendan