LPCOpen bug report

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
953件の閲覧回数
MindBender
Contributor II

There's a bug in LPCOpen, switching all peripherals on when trying to switch off one:

lpc_chip_40xx/src/clock_17xx_40xx.c, line 111:

/* Disables power and clocking for a peripheral */
void Chip_Clock_DisablePeriphClock(CHIP_SYSCTL_CLOCK_T clk) {
    uint32_t bs = (uint32_t) clk;

#if defined(CHIP_LPC40XX)
    if (bs >= 32) {
        LPC_SYSCTL->PCONP1 &= ~(1 << (bs - 32));
    }
    else {
        LPC_SYSCTL->PCONP |= ~(1 << bs);
    }
#else
    LPC_SYSCTL->PCONP |= ~(1 << bs);
#endif
}

Index: lpc_chip_40xx/src/clock_17xx_40xx.c
===================================================================
--- lpc_chip_40xx/src/clock_17xx_40xx.c    (revision 440)
+++ lpc_chip_40xx/src/clock_17xx_40xx.c    (working copy)
@@ -117,7 +117,7 @@
         LPC_SYSCTL->PCONP1 &= ~(1 << (bs - 32));
     }
     else {
-        LPC_SYSCTL->PCONP |= ~(1 << bs);
+        LPC_SYSCTL->PCONP &= ~(1 << bs);
     }
 #else
     LPC_SYSCTL->PCONP |= ~(1 << bs);

0 件の賞賛
返信
1 解決策
750件の閲覧回数
MindBender
Contributor II

The patch above was incomplete and inadvertently posted by my wonky browser. The version attached to this post is complete. It patches two instances in two files in LPCOpen v2.10.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
751件の閲覧回数
MindBender
Contributor II

The patch above was incomplete and inadvertently posted by my wonky browser. The version attached to this post is complete. It patches two instances in two files in LPCOpen v2.10.

0 件の賞賛
返信
750件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Robert Delien,

Thanks for your sharing, and I will transfer the report to the AE for checking.

Thanks again.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信