Skip to main content
Topic: SPI sniffer polarity? (Read 10837 times) previous topic - next topic

Re: SPI sniffer polarity?

Reply #15
I thought about the option of using the internal Flash program memory but, as noted, it has durability issues as well as the complication of needing to be erased eight rows at a time.  The other reason I discounted this option was because program memory space appears to be getting scarse with continued firmware development. 

After looking around a bit -- I'm still very very new here -- it looks like an EEPROM attached the ICSP header as used by the BASIC script engine to save it's programs might be the best option for configuration saving.  A simple daughter board could possibly even be produced as an optional accessory to hold the EEPROM and attach to the ISCP header.  This might also lead to an interim solution for the issue of what to leave out of the next firmware version.  While code can not be executed from external serial memory, the EEPROM could hold several different code options that could be copied into internal Flash program memory when the user selects certain features.

I also agree with the idea of making configuration saving manual and not automatic.  When re-entering a mode, the last used configuration could automatically be loaded but new config changes would not be saved automatically on exit, only when explicitly requested.  Once space limitations are no longer a concern by using external memory, having multiple configuration saving slots per mode would be possible.  The config loading could also potentially be done from the HiZ mode and so would contain the mode selection as well as the mode configuration.  Having the saved config slots be nameable would be even better than just numbered. 

-Eric

Re: SPI sniffer polarity?

Reply #16
There is an EEPROM daughterboard around here somewhere. The next version of the hardware will have a small EEPROM too, and probably an eventual update of the v3 hardware will include the EEPROM.
Got a question? Please ask in the forum for the fastest answers.

Re: SPI sniffer polarity?

Reply #17
Ian,

If you find the EEPROM daughter board do a blog post on it. 

I don't know if I have any I2C EEPROMs in my junk box but if so I might play with it a bit this weekend.

I got the Bus Pirate because I thought it might come in handy when I was working on my thesis project but it is turning in to a more of a fun distraction than a help.


-Eric

 

Re: SPI sniffer polarity?

Reply #18
Here's a test version with new macros 10-15 that set polarity without disabling the SPI module. I have no idea if this will work or if it's allowable. We might need to turn off the SPI module, do stuff, turn it back on, but I worry that will twiddle pins in undesirable ways mid-data.

Could you please give it a test?

Code: [Select]
SPI> (10)(11)(12)(13)(14)(15)
SPI (spd ckp ske smp csl hiz)=( 3 0 1 0 1 1 )

SPI (spd ckp ske smp csl hiz)=( 3 1 1 0 1 1 )

SPI (spd ckp ske smp csl hiz)=( 3 1 0 0 1 1 )

SPI (spd ckp ske smp csl hiz)=( 3 1 1 0 1 1 )

SPI (spd ckp ske smp csl hiz)=( 3 1 1 0 1 1 )

SPI (spd ckp ske smp csl hiz)=( 3 1 1 1 1 1 )

SPI>

10/11=p=polarity
12/13=e=edge
Got a question? Please ask in the forum for the fastest answers.

Re: SPI sniffer polarity?

Reply #19
I'll try to get the eeprom daughter board tomorrow.
Got a question? Please ask in the forum for the fastest answers.


Re: SPI sniffer polarity?

Reply #21
[quote author="Eric"]
After looking around a bit -- I'm still very very new here -- it looks like an EEPROM attached the ICSP header as used by the BASIC script engine to save it's programs might be the best option for configuration saving.  A simple daughter board could possibly even be produced as an optional accessory to hold the EEPROM and attach to the ISCP header.  This might also lead to an interim solution for the issue of what to leave out of the next firmware version.  While code can not be executed from external serial memory, the EEPROM could hold several different code options that could be copied into internal Flash program memory when the user selects certain features.
[/quote]

There is also some support for this in basic.c We left it out because of space constraints. In its current form it lacks proper directory support; it simply divides the i2c memory into x pages. each pages is the size of the basic memory. The board ian showed can be used for this purpose.

IMO It is not very pratical to use this for storing firmware parts. The current framework needs to be rewritten a lot for 'dynamic module loading'.

Re: SPI sniffer polarity?

Reply #22
The next hardware update has plenty of room for these features though, and an on-board eeprom :)
Got a question? Please ask in the forum for the fastest answers.

Re: SPI sniffer polarity?

Reply #23
[whoops... wrong thread, please ignore].