comparison Bootloader/main.c @ 347:136e47478441

UARTConnect enumeration working! - Fixed cli reflash mode set - Cleaned up debugging code - 4 500 000 baud seems to be reliable - Fixed master selection (assumes slave node unless USB enumerates)
author Jacob Alexander <haata@kiibohd.com>
date Sat, 18 Jul 2015 18:53:21 -0700
parents 932ef3bbd4d7
children b02fc17eb027
comparison
equal deleted inserted replaced
346:1beec5f17e64 347:136e47478441
208 printHex( (uint32_t)_app_rom ); 208 printHex( (uint32_t)_app_rom );
209 print( NL " Soft Rst - " ); 209 print( NL " Soft Rst - " );
210 printHex( memcmp( (uint8_t*)&VBAT, sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic) ) == 0 ); 210 printHex( memcmp( (uint8_t*)&VBAT, sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic) ) == 0 );
211 print( NL ); 211 print( NL );
212 212
213 // XXX REMOVEME
214 /*
215 GPIOB_PDDR |= (1<<16);
216 PORTB_PCR16 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
217 GPIOB_PSOR |= (1<<16);
218
219 // RST
220 GPIOC_PDDR |= (1<<8);
221 PORTC_PCR8 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
222 GPIOC_PSOR |= (1<<8);
223
224 // CS1B
225 GPIOC_PDDR |= (1<<4);
226 PORTC_PCR4 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
227 GPIOC_PCOR |= (1<<4);
228 */
229 // Backlight
230 /*
231 GPIOC_PDDR |= (1<<1);
232 PORTC_PCR1 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
233 GPIOC_PCOR |= (1<<1);
234 GPIOC_PDDR |= (1<<2);
235 PORTC_PCR2 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
236 GPIOC_PCOR |= (1<<2);
237 GPIOC_PDDR |= (1<<3);
238 PORTC_PCR3 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
239 GPIOC_PCOR |= (1<<3);
240 */
241
242 #ifdef FLASH_DEBUG 213 #ifdef FLASH_DEBUG
243 for ( uint8_t sector = 0; sector < 3; sector++ ) 214 for ( uint8_t sector = 0; sector < 3; sector++ )
244 sector_print( &_app_rom, sector, 16 ); 215 sector_print( &_app_rom, sector, 16 );
245 print( NL ); 216 print( NL );
246 #endif 217 #endif