Categories

Drops N’ Roses : AT45DB321E test

Hey !

This week-end (and yersterday) I made some tests to check if the behaviour of our drop was correct.At the beginning, I created a new file in order to work with a clean repository (because I could not stand to work in the SDK file anymore). Then, I created our own drop_board.h, change the Makefile, and make a really simple test : a blinking led (yes, we have one !). So that is how our dead drop came alive.

After this primary test, I tried to write and read some pages of the flash memory. Write a page, erase one, and read one were succesful tests. But writing a byte was giving strange results. So, I factorize my code to make it easier to read… and I corrected a stupid mistake (a & instead of a | ) for writing the byte address in the same 3 bytes already used for page address. And this time, the function to write a byte was working. Afterwards, I check if it was possible to write a whole page and rewrite some of the bytes of the same page without erasing the page.
To give an example, what I would like to test was :
– I write a whole page with some bytes at 0xFF.
– Am I able to rewrite those bytes at 0xFF ?
The answer is yes. And it is even better ! I can rewrite a bit : if I have 0xFF (1111 1111), I can put 0xFE (1111 1110) and then 0xBE (1011 1110). Then, if I write 0xF9, I will obtain (1011 1000).
This is because the write operation for this memory is just puting “0” instead of “1”. And because we can’t erase a smaller area of the memory than a page (meaning to put every bits of the page at 1), we can only lower the value of a byte when we write the flash. That was a relief (even if we have to change our memory architecture, because we were not sure to have this bit writing possible, and so we plan to use a complete byte for some information that we can now store in one bit.

Then, I would like to test the BLE. But… this time, we had a really bad surprise. I was wondering what version of the SDK I could use with my drop, so I read our nRF number : N51822QFAAC0. The C0 corresponds with an old version of Nordic SDK (4.4).
With our eval kit, we were using SDK 5 because we had N51822QFAAG0. And there are a lot of differences between these versions. That is a bad surprise for everybody, because some functionalities are only working using the new SDK.

After this bad new, I decide to do another thing : merge our branches. And it was quite complicate because we were not working in same branches, nor at the same level (because Lau and Matthieu still worked on the SDK file, whereas I created a new one), but some changes were made in “same” .c or .h.
Sam helped us a lot. We had to rewrite history, to pretend that we had always worked on the “new file” I created, and then merge some files, etc… It was not so easy.
But now, it is done. And I added the SDK 4 in our repository as well.

Yersterday evening, Matthieu was trying to make the BLE working. I hope he succeeds.

Commentaires fermés.