IshDeshpa / EE319H-Lab10-PvZ

Luke Mason and Ishan Deshpande's EE319H Final Project: Plants vs Zombies
0 stars 0 forks source link

Music + Better SD/ST7735 Drivers #10

Closed IshDeshpa closed 2 years ago

IshDeshpa commented 2 years ago

Implement and test Sound and Music structs and DAC output (sound effects can wait for later)

IshDeshpa commented 2 years ago

Note: some registers are locked by default and need writes to their GPIOCR and GPIOLOCK bits (e.g. PD7). View diskio.c and signal tables on pg 1329 of manual.

IshDeshpa commented 2 years ago

Note: any new files added to the Keil folder also need to be added within Keil so that it compiles. Right click the "source" folder on the left and hit "add existing files to group"

IshDeshpa commented 2 years ago

https://academy.cba.mit.edu/classes/networking_communications/SD/SD.pdf

IshDeshpa commented 2 years ago

Note: both diskio.c and TExaS.cpp use Timer5A. Change the diskio.c timer to timer 1 or smth

IshDeshpa commented 2 years ago

Note: sometimes when the SDC doesn't like you, the initialization function returns a F_NOT_READY or an F_NO_FILESYSTEM error. This is a bug that I think might have something to do with waiting for messages or even screwing up the formatting of the SD when initializing. Also it usually happens after an initially successful test so maybe it has something to do with that. Regardless, a temporary way I've found to fix it is to just run until the while true loop, stop the program, remove the SD, and reformat it with FAT16.

IshDeshpa commented 2 years ago

image

IshDeshpa commented 2 years ago

It's freezing at the writedata function in ST7735.c when waiting for the receive queue to be not empty