Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

More than one sector in SensRcore

Rank

Total Posts: 4

Joined 2010-10-19

PM

Hi,

after successfully using a single sector script, I tried to put two sectors into the NVM, with the intention to switch between the configurations in the two sectors with the "devsel1" signal. The two scripts were tested individually and both worked. However, if I put them in consecutive sectors of the NVM, I always see the first sector working, no matter what voltages are present on the devsel1-3 inputs. I loaded the script into the AT3 module with ANTware II (which replied "success") and used the dipswitches on the battery board of the dev kit to set devsel1-3 to all combinations. Also used the reset button and even put the battery out of the board. The result is always the same: First sector working properly. This is my script, as dumped by ANTware II:

D FF
C [42][00][50][00]
C [51][00][21][00][01][01]
C [91][00][00][42][00][01][00]
C [43][00][00][10]
C [63][00][0C]
C [44][00][0C]
C [45][00][4E]
C [60][00][03]
C [4B][00]
E
C [42][00][50][00]
C [51][00][21][00][01][01]
C [91][00][00][42][00][01][00]
C [43][00][00][04]
C [63][00][0C]
C [44][00][0C]
C [45][00][4E]
C [60][00][03]
C [4B][00]

I also tried a modification with a second "E" at the end. What's wrong?

Thank you!

Regards,

Heinrich      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

When using multiple sectors, you need to use the Read Pins for Sector message (0x92) to tell the device to read the DevSel pins. This needs to be present on sector 0. More details are available in the SensRcore Messaging and Usage document, sections 3.1.4 and 4.1.3.      
Rank

Total Posts: 4

Joined 2010-10-19

PM

Thank you for your quick reply, Alejandra.

My new script looks like this:

D FF
C [42][00][50][00]
C [51][00][21][00][01][01]
C [91][00][00][42][00][01][00]
C [43][00][00][10]
C [63][00][0C]
C [44][00][0C]
C [45][00][4E]
C [60][00][03]
C [4B][00]
C [92][00]
E
C [42][00][50][00]
C [51][00][21][00][01][01]
C [91][00][00][42][00][01][00]
C [43][00][00][04]
C [63][00][0C]
C [44][00][0C]
C [45][00][4E]
C [60][00][03]
C [4B][00]
E

(added C [92][00] to the end of sector 0). Now changing the dipswitches has the desired effect, but only after the next reset. Is it possible to let a script immediately change parameters after the devsel inputs are changed? My only goal is to control the message rate by an external signal.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

You could try reading the pins first.

e.g.

C [92][00] // Read DevSel pins
E

// Page 0
C //// COMMANDS
E

// Page 1
C /// COMMANDS
E

// ETC      
Rank

Total Posts: 4

Joined 2010-10-19

PM

Ok, new script looks like this:

D FF
C [92][00]
E
C [42][00][50][00]
C [51][00][21][00][01][01]
C [91][00][00][42][00][01][00]
C [43][00][00][10]
C [63][00][0C]
C [44][00][0C]
C [45][00][4E]
C [60][00][03]
C [4B][00]
E
C [42][00][50][00]
C [51][00][21][00][01][01]
C [91][00][00][42][00][01][00]
C [43][00][00][04]
C [63][00][0C]
C [44][00][0C]
C [45][00][4E]
C [60][00][03]
C [4B][00]
E

But no success yet. Again, a reset is required to make the module use the other script sector. Is there any other thing I could try?

Heinrich      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

You do need a reset to use a different sector. Keeping the read pin as the only command in the default sector will at least prevent you from executing unintended commands.