Post by mjb on Oct 25, 2016 10:07:41 GMT
We have made some updates and improvements to the ShieldBuddy environment. The latest release is at:
www.hitex.co.uk/fileadmin/uk-files/downloads/ShieldBuddy/ShieldBuddyMulticoreIDE.zip
This is not a hotlink so you will have to copy this FTP address into your browser address box. The unzip password is "ShieldBuddy", as is the password for the installer.
1. The ADC reading is now able to support up to 500k samples/sec and we have fixed some problems with the analogWrite() for channels 10-13.
2. We found that some shields which use the analog PWM outputs could not cope with the 400kHz PWM carrier frequency produced by the TC275. We have now added a special function ("useArduinoPwmFreq()") to reduce this to 1.5kHz, which is more like the frequency used by the Arduino Uno.
3. To support Multicore programming, we have created some macros which will allow you to force variables into the local DSPR RAMs for each of the 3 cores. This is important if you are using cores1 & 2 as by default, the compiler will place global variables into the DSPR0 RAM for CPU0 at 0x7000000. The access speed for cores1 and 2 to this area is slow. If variables for core1 are at 0x60000000 and for core 2 at 0x50000000, you code will be much faster. You can also now put variables into the LMU RAM at 0xB0000000, which is reasonably fast access from all cores.
4. There are now timer interrupts available for Cores1 & 2. These allow you to call up to two functions periodically by using the Aurix's three STM system timers.
E.g.
CreateTimerInterrupt0_Core1(ContinuousTimerInterrupt, 10000, STM1_inttest0_function);
CreateTimerInterrupt1_Core1(ContinuousTimerInterrupt, 5000, STM1_inttest1_function);
Where STM1_inttest0_function and STM1_inttest1_function are functions to be called every 10ms and 5ms respectively. The 10000 means 10000 * 0.01nanoseconds = 1ms
Core2 has:
CreateTimerInterrupt0_Core2(ContinuousTimerInterrupt, 10000, STM2_inttest0_function);
CreateTimerInterrupt1_Core2(ContinuousTimerInterrupt, 5000, STM2_inttest1_function);
Core0 has only one interrupt event available:
CreateTimerInterrupt1_Core2(ContinuousTimerInterrupt, 5000, STM0_inttest1_function);