On a Kinetsis system using MQX3.7 we have external ram on the Flexbus. On MQX3.7 that memory worked, but now on MQX3.8 it doesn't. The board has changed slightly in the meantime (great changing 2 things at once ) but I believe that those board changes have been faithfully carried across to 3.8. I'm wondering if MQX3.7 with a bsp modified from the Tower system, setup up a register that I didn't realise, and now,in 3.8 it it doesn't. So I'm hoping that someone can check my logic and see what I'm missing.
What is happening is that on using the memory (doing a write then a read) the first time, an unexpected interrupt is being triggered. I'm assuming that means that the the flexbus registers are not liking something so that it seems that I'm writing to invalid address.
What I've done to setup the memory is:
1) Setup SCG7 to send the clock to the flexbus
2) Setup SOPT2 to allow off chip accesses
3) Setup all the pin muxing for the address/data/CS/etc. signals
4) Setup CS3- CSAR to the base address (0x70000000)
5) Setup CS3-CSCR for AA, BLS, WS=2
6) Setup CS3-CSMR with a BAM of 0x000f (the memory is 1MByte of 8-bit SRAM)
7) Orred into CS3-CSMR the V_MASK to make it valid
I assume that after these steps that the flexbus module is ready to go and will assert !CS3 for accesses on memories from 0x70000000 to 0x70100000.
1) Am I missing something for setting up the flexbux?
2) Does it make sense that this would work in MQX3.7 (on CS2) but not on MQX3.8 (on CS3)?
3) Is the BAM of 0x000f correct for the range of addresses? I find the documentation on the BAM very hard to follow
3) Any other suggestions?
Thanks a lot!
So, could someone check if the my assumptions are correct: