⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
5 posts / 0 new
Last post
vrabo
Offline
Last seen:2 years 10 months ago
加入:2016-11-04 19:19
Wrong output SmartSnippets

Hello!

I made a custom board where a button is attached to P0_6. The button is configured as INPUT_PULLUP and connected to 3.3V and a resistance. Whenever I tried to debug it using Keil works perfectly. It shows 0 on the LightBlue app and 1 when it's pressed. But when I tried using SmartSnippets Toolbox it shows 1 all the time, so I can´t activate the interruption.

I looked at the board setup in SmartSnippets and one of the SPI ports was using P0_6 so I changed it to a port I don't use. But still, I have the same issue.

Any idea why is this happening?

Thank you very much.

Device:
MT_dialog
Offline
Last seen:1 month 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi vrabo,

Hi vrabo,

I am not sure i understand the question, you have configured the push button on P06 as input pull up (that means that you have enabled the internal pullups of the 580) and you also attached an external pullup resistor as well ? I suppose that the button is connected to the ground and whenever you press it you detect a low level interrupt. Please check the lines in order to check the actual state of the circuit when pressing the button or when the button is not pressed and also check if the interrupt is triggered. Regarding the flash, after the device has mirrored the fw in the RAM the functionallity of the pins is what your periph_init() function states. Also if you can share some of the implementation perhaps something goes wrong there.

Thanks MT_dialog

vrabo
Offline
Last seen:2 years 10 months ago
加入:2016-11-04 19:19
Thanks for the quick answer.

Thanks for the quick answer.

I added the image of that specific part of the schematic.

When I use Keil uVision for debugging, the default value (button not pressed) is 0, it becomes 1 when pressed. The problem I'm having is that when I use SmartSnippets the default input becomes "1" instead of 0, so my interruption never happens because it never changes state.

附件:
vrabo
Offline
Last seen:2 years 10 months ago
加入:2016-11-04 19:19
i added here the screenshots

i added here the screenshots of the bluetooth app.

附件:
MT_dialog
Offline
Last seen:1 month 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi vrabo,

Hi vrabo,

Again i dont quite get how this is going to work, you have the P06 as an input pull up and you have connected the button to a 3V3 power, try to connect the S1 to ground or try to change the configuration of the pin in INPUT_PULLDOWN. You can also check the pro board and circuit used for the buttons. Regarding the fact that it works with keil and not with Smart Snippets i am not able to interpret that since as i ve said as soon as the fw is mirrored in the RAM the pin configurations are the one that you have set in the periph_init().

Thanks MT_dialog