A weekend challange

Looks like our experts at GHI can’t get the EEPROM on mBuino to work!!! I thought they are crazy so I tried myself and I still can’t get it to work!

So here is your challenge, can you get the EEPROM to work on mBuino or any of the other outrageous circuits to work!!!

Note that the code for this is already done (for LPC11U24) but nothing works on our chips!!

…go ahead show off your programming muscles and make this work! :wall:

Hmmm… I see some strange numbers.

Can you tell how is memory mapped on mBuino?
Is it possible that the platform is misconfigured?

We can read the chip version just fine but any other command results into 0E error code, which doesn’t mean anything in the manual!

But since you said something about the platform, yes it has an issue and we fixed but still waiting for the next sdk release! I will try it with the fixed platform as this is the only logical explanation.

Definitely something wrong with the platform configuration

IAP: EEPROM writing test
device-ID = 0x2988402B, serial# = 0x15FFD037, CPU running 48000kHz
copied: SRAM(0x10001FD8)->EEPROM(0x00000000) for 8 bytes. (result=0x0000000E)
copied: EEPROM(0x00000000)->SRAM(0x10001FD8) for 8 bytes. (result=0x0000000E)

See that address - 0x10001FD8.
It is out of RAM address space. Unless I am missing something.

That chip only has 6K of main RAM (you need to update platform documentation page, it shows 10K).

The mBed IDE thinks that platform has 8K of main RAM for some reason.

EEPROM controller or IAP errors out with status 0x0000000E. If NXP is consistent then it means ADDR_NOT_MAPPED.

Yep! Success!!!

I have moved two arrays from being local variables in the function into the IAP class.
Now they are allocated on the heap (closer to the beginning of the address space) instead of the stack. I was able to write to EEPROM and read back!

My E-Dice can remember its sensitivity level now.

8 Likes

This is what got us completely off. The stack was always wrong, due to memory set incorrectly in the platform by the first clone mbed provided to us. Nothing should have worked but everything seemed to work fine until last week where Jeff kept getting unexpected crashes. I then found the wrong settings and fixed them, waiting for acceptance on the pull request from mbed.

It never crossed my mind that this wrong setting is also effecting the IAP! I am glad things will make sense from note on :slight_smile: thanks for the hint.

Speaking of memory, I think mbed also forgot to reserve memory for the stack, not just in our platform but in every other platform I looked at! I mentioned it to them but they didn’t seem interested! Anyway, both issues are covered in our platform.

Yes, I was surprised it works. I do get random crashes too sometimes. The stack issue explains that. When are they going to apply the fix?

There were two problems, size and location. The location is the cause.

We are waiting for them to accept the changes.

If anyone care to see why this hasn’t made it to the platform yet Fixed the startup_LPC11xx.s files in ARM Micro and ARM STD - they had wr... by Experiment-626 · Pull Request #578 · ARMmbed/mbed-os · GitHub

1 Like

The stack issue is resolved. It will be available in the next sdk. You can use today by pulling in the core source code in your project. Just a FYI notice.

3 Likes

Awesome! Have you guys tested it already?

With eeprom? I think the team did, can’t remember.

so what will Architect get :whistle:

2 Likes

It will ship this week, something no one have seen yet. It is really small and has a lens!

2 Likes

@ Gus - Again, not something for the general public! :naughty: :whistle:

@ Gary - I don’t think superhumans are considered general public… :slight_smile:

@ taylorza - He didn’t email @ Architect, he is telling everyone on this thread…lol And it’s part of my job to keep some of the information a secret until we as a company are ready to talk. 8)

let me guess, actually let me ask a question: does Gary wear glasses, or contact lenses ::slight_smile: maybe it’s Gary’s bionic eye :whistle:

@ Jay Jay - LOL, you got it, Gus is sending me around the world to meet the different members who contribute to this community. And if you are lucky enough to have made the list feel free to donate to my vacation fund! 8)

I think you’re gonna need a bigger roll of duct tape. Just sayin’

:wink:

1 Like