|
Post by Admin on Jun 16, 2017 11:03:43 GMT
We are please to announce the release of ShieldBuddy add-in v1.45. This corrects the naming of the I2C on the SCL1 and SDA1 pins. These were previously referred to as pins 16 and 17 which was incorrect. There is also a new 9-channel general purpose timer interrupt facility. This allows periodic interrupts to be created from any core, using the ATOMs in the GTM. This example sets up three interrupts that will call user defined handler functions: // Set user handler functions TimerConfig[0].user_inthandler = UserTimer0Handler; TimerConfig[1].user_inthandler = UserTimer1Handler; TimerConfig[2].user_inthandler = UserTimer2Handler; // Initialise general timer channels InitialiseAtomTimerChannel(0); InitialiseAtomTimerChannel(1); InitialiseAtomTimerChannel(2); // Set period of timer interrupts SetAtomTimerChannelPeriod(0,0x8000); // 32768 * 0.02us period SetAtomTimerChannelPeriod(1,0x4000); // 16384 * 0.02us period SetAtomTimerChannelPeriod(2,100000); // 100000 * 0.02us period The new version can be downloaded from: www.hitex.co.uk/fileadmin/uk-files/downloads/ShieldBuddy/ShieldBuddyMulticoreIDE.zipwww.hitex.co.uk/fileadmin/uk-files/downloads/ShieldBuddy/ShieldBuddyMulticoreIDE.exewww.hitex.co.uk/fileadmin/uk-files/downloads/ShieldBuddy/ShieldBuddyPinoutRevB_UM.pdfAll the passwords are "ShieldBuddy".
|
|
|
Post by stefan on Aug 28, 2017 21:40:25 GMT
Hello,
The links to download ShieldBuddyMulticoreIDE are broken.
Regards
|
|
|
Post by meijoa on Jan 23, 2018 14:04:51 GMT
Hi,
I used a 20ms a 100ms and a 1000ms Timer for a Project. The 1000ms Timer doesnt work properly, somehow its limited to about 329ms. What are the limitations?
Regards
|
|
|
Post by Admin on Jan 23, 2018 14:36:33 GMT
That's wierd, the longest time is about 170 seconds and the shortest is around 1us. The units of time are by default based on 0.02us per count (50MHz).
|
|
|
Post by meijoa on Jan 23, 2018 16:06:48 GMT
Were you able to reproduce the Problem?
I used it in "void setup2()":
InitialiseTimerChannel(2);
TimerChannelConfig[2].user_inthandler = Timer1000msHandler; SetTimerChannelPeriod(2, 50000000);
and
void Timer1000msHandler(int i) {
//MSG3 CAN0_SendMessage(0x100, MSG3.dword[0], MSG3.dword[1], 8);
}
But it only works properly for the 20ms and 100ms cases.
|
|
|
Post by Admin on Jan 24, 2018 11:43:33 GMT
Yes the "SetTimerChannelPeriod(2, 50000000);" works here!
|
|
|
Post by meijoa on Jan 24, 2018 14:42:53 GMT
It will compile and run, but the output is wrongly timed. I used core 3 and some CAN Functions. Did you measure the Time interval?
|
|
|
Post by Admin on Jan 24, 2018 15:30:48 GMT
Sorry, looks like a documentation error. The max timer period is 333ms as there is a base clock of 50MHz and the time is limited to 0xFFFFFF. You can extend this manually changing the base clock used to 12.5MHz:
// Set user handlers TimerChannelConfig[2].user_inthandler = UserTimer2Handler;
// Initialise general timer channels InitialiseTimerChannel(2);
// Set general timers base clock to 12.5MHz CMU_CLK4_val = 7; // Get a 12.5MHz CMU_CLK4 (12.5MHz = 100000000MHz/(7+1))
setupGtmClocks(); // FX_CLK0 => 10ns setupGtmTbu(); // TBU_CH0 counts CMU_CLK0,TBU_CH1 counts CMU_CLK1
// Set period of timers SetTimerChannelPeriod(2,12500000); // 1 sec period
Now the units of time will be in units of 80ns.
We will fix this and allow an user-definable base clock in the next release.
|
|
wiken
New Member
Posts: 45
|
Post by wiken on Jan 26, 2018 9:50:35 GMT
Hi. Earlier you released Add in 1.60, now you release 1.45, which is the latest one? \Wiken 
|
|
|
Post by tegwyntwmffat on Jan 30, 2018 13:59:55 GMT
I'm not trying to be clever, but are there any other types of interrupts other than timer interrupts?
|
|
|
Post by Admin on Jan 30, 2018 15:51:31 GMT
You can create an interrupt from a pin changing state. You can also force an interrupt to occur in another core.
|
|
|
Post by klabba on Jul 30, 2018 23:05:22 GMT
Dear hitex team, I would like to use the GenTimersTest example but the compiler shows this error message: "GenTimersTest:54: error: 'TimerConfig' was not declared in this scope" I am using the ShieldBuddyMulticoreIDE version 1.6. Do I need to go back to version 1.45? Where do I get the version 1.45? many thanks
|
|
|
Post by Admin on Jul 31, 2018 7:35:08 GMT
Hi,
ShieldBuddy add-in version 1.6 is fine. There was a mistake in the GenTimersTest.cpp which has now been corrected. Please try this version.
GenTimersTest.ino (3.01 KB)
Or:
GenTimersTest.cpp (3.22 KB)
|
|
|
Post by klabba on Aug 6, 2018 8:09:46 GMT
Hi Admin,
thanks, it's working very well now.
|
|