瀏覽代碼

Use CCM_CBCMR instead "/7"

main
Frank 5 年之前
父節點
當前提交
1a49564c74
No account linked to committer's email address
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      SPI.h

+ 2
- 1
SPI.h 查看文件

@@ -1053,7 +1053,8 @@ private:
__attribute__((__always_inline__)) {
// TODO: make these implement settings - for now, just fixed config

uint32_t d, div, clkhz = 528000000/7; // LPSPI peripheral clock
uint32_t d, div;
uint32_t clkhz = 528000000u / (((CCM_CBCMR >> 26 ) & 0x07 ) + 1); // LPSPI peripheral clock
if (clock == 0) clock =1;
d= clkhz/clock;
if (d && clkhz/d > clock) d++;

Loading…
取消
儲存