Part Number: MSP430F249
Tool/software:
I was testing to see how long it would take to fill up this 25LC512 EEPROM I'm working with. To do so, I just have a quick function that issues my writeEEPROM() command at every memory address. when I try to read or write to every single memory address, it freezes. When I debug line-by-line though, it works as expected, which makes me think there is a timing issue caused by the way I'm handling the flags wrapped around my SPI_transmit or with my clock (currently set as 100 kHz).
I have a while (!(IFG2 & UCB0TXIFG)); and while (UCB0STAT & UCBUSY); wrapped around where I send data to the Tx buffer and a while (!(IFG2 & UCB0RXIFG)); before I read from the Rx buffer, so I don't see how my timing could be off. Given that my clock is only 100 kHz, I also don't see how it'd be too fast for my EEPROM to issue commands. Consulting the datasheet, it states that there is a Twc (internal write cycle time) of 5ms, but would this not be taken care of by my flags?
I'm sure I'm missing something, so any advice would be appreciated. Thanks!