Maybe Issues with SPI update?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Maybe Issues with SPI update?

Post by Lord Grezington »

Hello Everyone

I did a program a while back in FC6, I then did an update to the program where I needed to add Modbus Slave back in November last year. Back then it seemed to work fine, but now I am having issues... And its defenitly based on FC8 and its updates...

So, I have attacehd the FC6 Program that works fine once it get compiled from FC6. When I open from FC8.2 I need to set the RS232 component to no RX pin in order for it to compile (the RS232 is obsolete now anyway). Then when I test it on hardware the SPI does not work anymore as well as the output on A4. When I do a little blinker program (on A4) I can find out that it will work when I put the blinker before the SPI initialise, and will not work after it.

*EDIT* one more thing. I have changed the Auto CS for hte SPI on/off, this does nothing. Also when I use the correct pin for hte CS / SS it still does not work.

Hope this all makes sence, let me know if you need more information

Thanks
Attachments
FC6.fcfx
(45.41 KiB) Downloaded 150 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Maybe Issues with SPI update?

Post by Benj »

Hello,

I've looked at the SPI Initialise CAL code and there are no blocking functions there which could potentially cause a lockup.

Can you add a flasher to flash say twice before you do the initialise to see if the initialise is causing the MCU to reset?

You could also maybe try SPI channel 2 which has the remappable pins and see if this is any better.

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Maybe Issues with SPI update?

Post by Lord Grezington »

Hi Ben

Thanks for the reply

I will try using channel 2 and remap the pins.

I dont think the SPI component starts the reset, I think it just prevents some of the other features working (like the flash on the pin)

Thanks

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: Maybe Issues with SPI update?

Post by Lord Grezington »

Hi Ben

Switching to Channel 2 and re-mapping the pins seems to have worked. Not sure why channel 1 is not working.

Thanks for your help

Post Reply