Hi Team,
Is there any way to enable/disable all interrupts? Will BLE connection get disconnected because of this? If yes the what are the possible ways to maintain the connection?
Hi Team,
Is there any way to enable/disable all interrupts? Will BLE connection get disconnected because of this? If yes the what are the possible ways to maintain the connection?
What problem are you actually trying to solve?
I need to implement software uart i.e. uart bitbang and in which I need to require disable interrupts except the timer interrupt which is handling either TX or RX at a time. Can you tell me how to this could be achieved? What is the max time period for which i can disable required interrupts and then resume again so that it won't hurt the ble connection?
Say i need to send 8 bytes of data @9600 baud rate and I need to disable few other interrupts in ble_uart_app will ble remain in connection?
Bottom line - you can't do it. The max period you can disable interrupts is ZERO, you may not disable interrupts when the softdevice is running, not for 1ms, not for 1us, not at all, not ever. That is the contract you make with the softdevice. You cannot do time-sensitive operations with the softdevice running. Period.
I wrote this post a week or so outlining how someone could try to use the Multiprotocol Timeslot API which gives you occasional, irregular, small slots of time during which you can do what you like, to bitbang out 1 or 2 or 3 characters over a UART, then shut everything down and wait for the next time it gives you a slot and do the next few. That's theoretically possible, it would be very hard to implement, you'd get very irregular transmission. My eventual suggestion was to use a separate UART chip.
I am not getting clearly. Can you tell me exact way to understand this? which are the APIs and how it works exactly?
I can't really make that post any clearer. Go and read the multi protocol timeslot documentation, that tells you everything about how it works and how to use it. You just need to fit your bit banging into small chunks. If it's not clear after reading it, then you're probably not in a position to try writing the code.
What, by the way, is wrong with the hardware UART built right into the chip? Why can't you use that, it's what it's there for.