FRAM COMPONENT

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
BenR
Matrix Staff
Posts: 2063
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 549 times
Been thanked: 733 times

Re: FRAM COMPONENT

Post by BenR »

I have implemented a component for v11 which is now tested and working.

I've not looked at Martin's code yet and so there may be things there that would be good to bring into the component but let me know if there's anything lacking.

As always many thanks to Martin for providing his time to give a v10 solution for the community.

max.tisc
Posts: 147
Joined: Thu Dec 10, 2020 5:40 pm
Been thanked: 11 times

Re: FRAM COMPONENT

Post by max.tisc »

Hi,
great work, will you also make a version for FC10?

BenR
Matrix Staff
Posts: 2063
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 549 times
Been thanked: 733 times

Re: FRAM COMPONENT

Post by BenR »

Hello,

I probably won't release for v10 no.

But there's likely not a lot I can do if you were to download the component in v11 and transfer it into v10 yourself ;)

mnfisher
Valued Contributor
Posts: 1776
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 148 times
Been thanked: 841 times

Re: FRAM COMPONENT

Post by mnfisher »

Thanks Ben,

Is the component source on the wiki yet? - I did have a brief look and didn't find it...

Martin

BenR
Matrix Staff
Posts: 2063
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 549 times
Been thanked: 733 times

Re: FRAM COMPONENT

Post by BenR »

Hi Martin,

Thanks for letting me know. I have now pushed all the latest component changes to the wiki and written a script so filtering out all the bits that need pushing is now far easier to keep track of :D

I need to refresh the main components index page which I'll do in the new year but all the new component pages and source files should be up to date now.

Here's the page you were looking for.
https://www.flowcode.co.uk/wiki/index.p ... C_(EEPROM)

mnfisher
Valued Contributor
Posts: 1776
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 148 times
Been thanked: 841 times

Re: FRAM COMPONENT

Post by mnfisher »

Thanks Ben - will take a look...

This is where I got to - now with a Write String, Int and Long array macros - and their read equivalents.
Tested on an Arduino (but also compiled for a PIC16F18877) using v10.

Have tested the (and here using just 4 value writes) - Int and Long versions. And looks good at UART and on logic analyser.

The String read is actually the slowest - and here are two versions - one which will read to a maximum number of bytes and one which looks for the termination character (\0)

Note that the arduino stores data in memory is LSB..MSB format - so values written as an int for '1' - is 1, 0 - but the FRAM chip expects the address in MSB LSB format - so address 1000 is 3, 0xE8 - which looks odd (on the 'scope) - but is correct (and the read will work - as long as you don't try and change types - or change MCUs :-) )

The WriteLongArray - the argument is MX_UINT32 **PFCL_DATA - which might vary with different MCUs?

Martin
Attachments
FRAM_2.fcfx
(51.46 KiB) Downloaded 20 times

max.tisc
Posts: 147
Joined: Thu Dec 10, 2020 5:40 pm
Been thanked: 11 times

Flowcode v10 Re: FRAM COMPONENT

Post by max.tisc »

Hi, happy new year
I'm testing the FRAM component with FC V10. If I write and read a single address like in the WIKI example, it works. But if I try to write and reread a series of data, it always returns the same value. Like in the example I did, if I write 10 addresses from 0 to 9, with data from 0 to 9 (address 0 given 0, address 1 given 1, etc.), when I read them back, I always get 9. If I change the number of addresses to 15, I always read 14. Using the analyzer, it seems to write to the right address and read to the right address, but it always reads the same value. Is the disablewriteprotect function called every time a write is needed, or is just one time enough? On my board, I saw that there's a writeprotect pin that I grounded to enable writing. Is this enough?
I can't load the terminal screen, which shows the value 9 for all the addresses read.
thank's
Attachments
read.png
read.png (38.66 KiB) Viewed 102 times
write.png
write.png (38.28 KiB) Viewed 102 times
FRAM_STM32F411_FC10_.fcfx
(18.79 KiB) Downloaded 7 times

BenR
Matrix Staff
Posts: 2063
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 549 times
Been thanked: 733 times

Re: FRAM COMPONENT

Post by BenR »

Ok let me investigate for you.

Post Reply