10 years, 5 months ago.

LPC1114FN28での同一ポート群からのデジタル出力について

LPC1114FN28で同一ポート群から別々にデジタル出力する場合に出力波形が乱れることがあります。

こちら、に状況をまとめました。
参考にしてください。

Question relating to:

The LPC1114FN28 is an ARM Cortex-M0 based, low-cost 32-bit MCU, designed for 8/16-bit microcontroller applications, offering performance, low power, simple instruction set and memory addressing together with reduced code size …

Hello suu pen,

out of curiosity, why don't you use English when writing a question ??

posted by Martin Kojtal 28 Oct 2013

自己解決しました。 mainルーチンでのデジタル出力を割り込み禁止にすれば、パルスの乱れはなくなります。

posted by suu pen 28 Oct 2013

1 Answer

10 years, 3 months ago.

LPC1114のtickerは、割り込み生成用にCT32B1を使っています。

https://github.com/mbedmicro/mbed/blob/master/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/us_ticker.c

ticker使用中にPIO1_4(CT32B1_MAT3)をGPIOとして使用すると競合するので、波形が乱れているのではないかと思います。

実行時の競合処理判定とか入れるとmbedライブラリ自体が大きくなりすぎるので、ライブラリ側のエラー処理は必要最低限としています。

回避策としては、他のポートを使用して頂くのが安全だと思います。 該当ポートのデジタル出力使用時に割り込み禁止すれば、ticker割り込みは抑止されるので波形の乱れは出なくなると思いますが、同一リソースを使用していることに変わりは無いので、潜在的な悪影響があるかもしれません。

Accepted Answer

Assigned to Yoshihiro TSUBOI 9 years, 11 months ago.

This means that the question has been accepted and is being worked on.