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:
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
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.
i added here the screenshots of the bluetooth app.
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