Question about custom BOB for a 7i92

More
3 years 5 months ago #272210 by blazini36
Replied by blazini36 on topic Question about custom BOB for a 7i92
PCW, when you get a chance this is the final pinout I need for the 2nd version of the firmware.

I removed the chip select decoder as I only have 2 devices now.
 

File Attachment:

File Name: 7i92_BoB_p...r3.0.txt
File Size:2 KB

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #272212 by PCW
Replied by PCW on topic Question about custom BOB for a 7i92
You would need to use DBSPI (decoded BSPI) if you do not use FRAME.
This is because BPSIs CS signals are just static addresses and not
de-asserted between frames (which most SPI chips require)

This would need minor changes in the driver to support DBSPI
(basically just accepting its GTAG and invoking the normal BSPI driver
plus cosmetic stuff like printing the pin names correctly)

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #272242 by blazini36
Replied by blazini36 on topic Question about custom BOB for a 7i92
So BSPI requires a decoder IC but DBSPI works like you would expect normal SPI to work?  That's slightly confusing.

I did design a "rev2" that uses the decoder but I ran "rev3" which is what that pinout list is for.

I'm pretty far off into the weeds with the component and 2 MCUs that need firmware (they do very basic things) so I'll see if my friend can modify the BSPI driver as well. Should this be a new "DBSPI" driver based on dbspi.c or should it just be an addition to bspi.c?

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago - 3 years 5 months ago #272244 by PCW
Replied by PCW on topic Question about custom BOB for a 7i92
BSPI uses an external decoder to save interface pins (since can support up to 16 different devices (so 8 pins total for 16 devices rather than 19)

There's no need for a separate interface file. In fact if there are not mixed types in one
configuration (BSPI+DBSPI), I dont think bspi.c needs to change at all. The minimum change is probably just one or two lines so that either BSPIs or DBSPIs GTAG both invoke the bspi driver(the rest would just be cosmetic so the pin printout and hal pin names were correct)

In fact, because the register maps are basically the same, it probably possible to create a DBSPI
configuration that requires no driver changes at all
Last edit: 3 years 5 months ago by PCW.

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #272248 by blazini36
Replied by blazini36 on topic Question about custom BOB for a 7i92
Well my friend wrote a very simple subdriver component that basically just has the hm2 functions so I can see how things show up in hal. I suppose once I have the new firmware with dbspi I can see how the stock bspi driver handles it.

It sounds like the changes to bspi.c are fairly simple but I'm guessing I'll have to compile linuxcnc from source to use the modified driver? Components are simple to deal with using halcompile but not sure about the driver.

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago - 3 years 5 months ago #272588 by PCW
Replied by PCW on topic Question about custom BOB for a 7i92
I have changed the BSPI firmware so you can use decoded or non decoded
Chip select outputs. That is, both types are now supported by the unchanged
LinuxCNC BSPI driver. If a frame pin is found for a BSPI channel, the external
decoder firmware is built, if not, the decoder is built into the firmware.
Last edit: 3 years 5 months ago by PCW.

Please Log in or Create an account to join the conversation.

Moderators: PCW, jmelson
Time to create page: 0.387 seconds
Powered by Kunena Forum