This commit is contained in:
2024-03-13 14:52:46 +01:00
parent 19be1a6e48
commit f5b0e67056
21 changed files with 391 additions and 18 deletions

View File

@ -7,7 +7,7 @@
static void spiSendOctet(uint8_t v) {
inline static void spiSendOctet(uint8_t v) {
// wait for TX buffer empty
while (!(UC0IFG & UCB0TXIFG));
// load octet into TX buffer
@ -33,7 +33,11 @@ void displayDriverInit() {
UCB0CTL0 = UCMST;
// SPI timing config
UCB0CTL1 = UCSSEL_3;
UCB0BR0 = 4; // 2 would be too fast and ends up with errors
// Faster than 8 ends up in strange communication errors
// between the both MCUs.
// With 8 the transfer of a complete 110 pixel canvas takes
// about 720us.
UCB0BR0 = 8;
UCB0BR1 = 0;
// BIT5: UCB0CLK