With the research I did before I implemented the nvram erase command for the GreenPAK(SLG46826). I erased the NVRAM and checked it. It worked perfectly.
With the now blank GreenPAK I decided to flash my new design. I powered everything up and it didn't work. I check the debug messages and interrupt from the GreenPAK didn't latch.
I remembered that I had added schmitt triggers on the column inputs, so I removed them again. Back to flashing, now I erased and accidentally flashed the old project file again. That was wasteful. I should have written to the registers instead to test.
I wrote the new design to the registers and the interrupt was working again. However when I pressed the keys, it's not playing back the correct key tones. Why?
Well, I forgot about the way it works, the GreenPAK sends an interrupt when a key is pressed. The MCU gets this and reads which key is being pressed through reading the registers of the GreenPAK over I2C. Instead of reading the LUT's I set it up to read the pins. Now this was a bad choice as the pinout has changed.
I have to rewrite the code for this. I'm going to have it read the LUTS directly instead. Time to read the datasheet again.
One step forward, two steps back but I'm on the right track.
Anders Helgesson
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.