diff options
Diffstat (limited to 'zbootloader.c')
-rw-r--r-- | zbootloader.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/zbootloader.c b/zbootloader.c index df168df..f1e931d 100644 --- a/zbootloader.c +++ b/zbootloader.c @@ -332,16 +332,19 @@ loop(void) int main(void) { + // Reset DMA + dma_ctrl = 0xC3; + // Init CTC // 16 prescaler, timer mode ctc_channel_1 = (CTC_CLK_TRG_BIT | CTC_TIME_CONST_BIT | CTC_RST_BIT | CTC_CTRL_OR_VECTOR_BIT); - ctc_channel_1 = (CPU_FREQ / 16 / 9600); + ctc_channel_1 = (CPU_FREQ / 16 / 9600); // 115200 // 200Hz clock ctc_channel_3 = (CTC_INT_BIT | CTC_PRESCALER_BIT | CTC_CLK_TRG_BIT | CTC_TIME_CONST_BIT | CTC_RST_BIT | CTC_CTRL_OR_VECTOR_BIT); - ctc_channel_3 = (CPU_FREQ / 256 / 36); + ctc_channel_3 = (CPU_FREQ / 256 / 144); ctc_channel_0 = ISR_OFFSET(ctc3_isr_ptr) | (3 << 1); // Init SIO |