<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>HardFault when sending UART data over NUS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80424/hardfault-when-sending-uart-data-over-nus</link><description>Hi all, As written above, as soon as I try to send an array of 8 bytes(8,255,0,1,64,64,0,1) onto the NUS the ble_nus_data_send and the consecutive sd_ble_gatts_hvx() trigger an hardfault which I am struggling to understand. In the call: 
 
 ble_nus_data_send</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Oct 2021 07:22:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80424/hardfault-when-sending-uart-data-over-nus" /><item><title>RE: HardFault when sending UART data over NUS</title><link>https://devzone.nordicsemi.com/thread/333393?ContentTypeID=1</link><pubDate>Mon, 11 Oct 2021 07:22:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97691816-c13f-4bb1-b9c0-d342c1ce1cff</guid><dc:creator>AndreaFont</dc:creator><description>&lt;p&gt;That explains! Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HardFault when sending UART data over NUS</title><link>https://devzone.nordicsemi.com/thread/333301?ContentTypeID=1</link><pubDate>Fri, 08 Oct 2021 15:05:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c40a6242-df86-4ee2-b241-f114fda2267b</guid><dc:creator>Sigurd</dc:creator><description>[quote user="AndreaFont"]As I decreased the UART interrupt priority from MID to LOWEST the hardfault disappeared. Any clue why that happens?[/quote]
&lt;p&gt;&lt;span&gt;You can only call softdevice api from application interrupt priority 5 and lower:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sds_s112/SDS/s1xx/processor_avail_interrupt_latency/exception_mgmt_sd.html"&gt;infocenter.nordicsemi.com/.../exception_mgmt_sd.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HardFault when sending UART data over NUS</title><link>https://devzone.nordicsemi.com/thread/333084?ContentTypeID=1</link><pubDate>Thu, 07 Oct 2021 13:41:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e45935f-93d2-4d1b-953f-c558cba7f58c</guid><dc:creator>AndreaFont</dc:creator><description>&lt;p&gt;As I decreased the UART interrupt priority from MID to LOWEST the hardfault disappeared. Any clue why that happens?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>