Hi Anthony,
Having referred to the FlexBus app note, I'm now a little bit stuck.
I have the LCD display hooked up to the Kinetis K60 tower stack through a custom circuit board. As previously mentioned, I've used FB_AD[15:0] to connect to the LCD_D[15:0] with LCD_DC connected to FB_AD[16] and FB_CS0 connected to the CS of the display.
I've managed to get the display working via bit-banging GPIO in 6800 mode (the display driver is an SSD1963 device).
When I try to swap over to use the FlexBus, nothing happens. My FlexBus initialization code looks like this...
#define FLEX_BASE_ADDRESS 0x60010000
#define FLEX_DC_ADDRESS 0x60000000
#define FLEX_ADDRESS_MASK 0x00010000
void flexbus_init(void) {
// Initializes the FlexBus peripheral
SIM_SOPT2 |= SIM_SOPT2_FBSL(3);
SIM_SCGC7 |= SIM_SCGC7_FLEXBUS_MASK;
FB_CSAR0 = FLEX_DC_ADDRESS;
// Set up the FlexBus for 16bit port, right adjusted with auto-ack
FB_CSCR0 = FB_CSCR_BLS_MASK | FB_CSCR_PS(2) | FB_CSCR_AA_MASK;
// Set the address range to 128k as the DC signal is on the address wire
FB_CSMR0 = FLEX_ADDRESS_MASK | FB_CSMR_V_MASK;
}
void flexbus_senddata(uint16 data) {
*((uint16 *)FLEX_BASE_ADDRESS) = data;
}
void flexbus_sendcommand(uint16 cmd) {
*((uint16 *)FLEX_DC_ADDRESS) = cmd;
}
All the PCR registers are correctly configured as ALT5 with drive-strength enabled.
I'm at a bit of a loss for what to try next. I'm thinking that I may need some wait-states but given that the clock cycle time for the SSD1963 is 9ns, it seems unlikely to be the fix.
I'd be grateful for any suggestions.
Best regards,
K