<?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>Question on interrupt process in nRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119219/question-on-interrupt-process-in-nrf52840</link><description>I want to confirm these questions,hope someone can give me some explaination. 
 1) RADIO has it&amp;#39;s own kernal which is some kind of MCU. 
 I have looked through some doc on BLE chips, most of them are dual kernal:one for layers higher,and one for RADIO</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Feb 2025 08:09:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119219/question-on-interrupt-process-in-nrf52840" /><item><title>RE: Question on interrupt process in nRF52840</title><link>https://devzone.nordicsemi.com/thread/524984?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2025 08:09:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:174ec37e-2c25-4a48-a8e0-f541198bf1c0</guid><dc:creator>OldXiao</dc:creator><description>&lt;p&gt;Just read the introduction of PPI&amp;nbsp;&lt;a href="https://www.nordicsemi.cn/blog/understand-nrf5-chip-peripheral-ppis/"&gt;如何理解nRF5芯片外设PPI - Nordic Semiconductor中文官网&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thing will get simpler.&lt;/p&gt;
&lt;p&gt;Maybe I can do like this:&lt;/p&gt;
&lt;p&gt;timerA: pwm&lt;br /&gt;timerB: control interval&lt;br /&gt;pinPWM=P0.11: pin to output PWM&lt;br /&gt;DMA_CHn: load compare value to timerB&lt;/p&gt;
&lt;p&gt;timerB interrupt(event)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt;(task)DMA_CHn load cv to timerB&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt;(task)PPI_CH[0].TASK_toggle_timerA(event)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt;(task)PPI_CH[1].TASK_CLR_pinPWM(event) &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt;(task)GPIOTE.TASK_CLR_pinPWM&lt;/p&gt;
&lt;p&gt;1)timerB timeout event trigger a)DMA to load new compare value to timerB; b)switch PWM(tmerA) output;&lt;/p&gt;
&lt;p&gt;2)switch PWM output will be the event to trigger clear pinPWM;&lt;/p&gt;
&lt;p&gt;3)clear pinPWM will trigger the action to clr pinPWM port.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on interrupt process in nRF52840</title><link>https://devzone.nordicsemi.com/thread/524937?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2025 23:38:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c75f72c-5c18-4762-896a-ffb4f76682e1</guid><dc:creator>OldXiao</dc:creator><description>&lt;p&gt;I get the way, I limited my thought before. &amp;quot;switch&amp;quot; is to change the value of register at last,it is same with changing compare values.&lt;/p&gt;
&lt;p&gt;Maybe I need use 3 DMA channels.&lt;/p&gt;
&lt;p&gt;The data array:&lt;/p&gt;
&lt;p&gt;tick:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1200&amp;nbsp; 300&amp;nbsp; 600&amp;nbsp; 300 300&amp;nbsp; 300 ...&lt;/p&gt;
&lt;p&gt;pwmOnOff: 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; ...&lt;/p&gt;
&lt;p&gt;pinLevel:&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; ...&lt;/p&gt;
&lt;p&gt;After switched off PWM,we need make sure the pinLevel is low,so set it low every time.&lt;/p&gt;
&lt;p&gt;tick -&amp;gt; timer_B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; DMA.channel_B&lt;/p&gt;
&lt;p&gt;pwmOnOff&amp;nbsp; -&amp;gt; timer_A&amp;nbsp; -&amp;gt;&amp;nbsp; DMA.channel_A&lt;/p&gt;
&lt;p&gt;pinLevel&amp;nbsp; -&amp;gt; pin_out&amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;gt;&amp;nbsp; DMA.channel_C&lt;/p&gt;
&lt;p&gt;trigger flow:&lt;/p&gt;
&lt;p&gt;pin_out = low&lt;/p&gt;
&lt;p&gt;timer_B.cv = 1200&lt;/p&gt;
&lt;p&gt;timer_A.en = 1&lt;/p&gt;
&lt;p&gt;timer_B.en = 1 ----&amp;gt;Int&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;-----&amp;gt;Int&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; DMA.channel_B move 300 to timer_B.cv&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt;repeat&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; DMA.channel_A move&amp;nbsp;0 to timer_A.en&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; DMA.channel_C move 0 to&amp;nbsp;pinLevel&lt;/p&gt;
&lt;p&gt;It should work,I will study the hardware drivers.&lt;/p&gt;
&lt;p&gt;Thank you for help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on interrupt process in nRF52840</title><link>https://devzone.nordicsemi.com/thread/524861?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2025 14:54:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d96ab9d-fed4-41b5-8cf0-4b925d2df1d0</guid><dc:creator>OldXiao</dc:creator><description>&lt;p&gt;OK,I will try to use connect SDK later.&lt;/p&gt;
&lt;p&gt;And,sorry,I mixed the application,for gateway, no IR send &amp;amp; receive function.&lt;/p&gt;
&lt;p&gt;Only BLE peripherals have IR functions,and for peripherals, the connection count is very few,so timeslot is long enough.&lt;/p&gt;
&lt;p&gt;But,from technical view,it will be perfect if I can use peripheral instead of CPU to finish the job.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Just forget IR function,it is PWM application.&lt;/p&gt;
&lt;p&gt;What the difference is:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All examples just need to update the compare values when time is up.&lt;/p&gt;
&lt;p&gt;In my case,I need not only update the compare values,but also need switch on/off PWM.&lt;/p&gt;
&lt;p&gt;The output looks like this(&lt;span class="  " data-bm="69"&gt;Pulse&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="  " data-bm="71"&gt;width&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="   " data-bm="73"&gt;modulation&lt;/span&gt;):&lt;/p&gt;
&lt;p&gt;preamble&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;/p&gt;
&lt;p&gt;PWM_1200us&amp;nbsp; SPACE_300us&amp;nbsp; &amp;nbsp;PWM_600us&amp;nbsp; SPACE_300us&amp;nbsp;&lt;span&gt;PWM_300us&amp;nbsp; SPACE_300us&lt;/span&gt; &lt;span&gt;PWM_600us&amp;nbsp; SPACE_300us&lt;/span&gt;&amp;nbsp; &amp;nbsp;...&lt;/p&gt;
&lt;p&gt;_-_-_-&lt;span&gt;_-&lt;/span&gt;&lt;span&gt;_-_-_-_-_-&amp;nbsp; [space]_-_-_-_-_-_-[space]_-_-_-[space]&amp;nbsp;_-_-_-_-_-_-&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Need 2 timers to finish the job at least: 1 outputs PWM, 1 control the interval.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The problem is the PWM output is not continuous,we need to switch it once per bit.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I don&amp;#39;t figure out the way without interrupt handler.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Anyway,this is&amp;nbsp;my application problem,not chip or SDK technical problem,you can just ignore it.&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: Question on interrupt process in nRF52840</title><link>https://devzone.nordicsemi.com/thread/524823?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2025 13:46:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2e159fe-8166-4fc4-8747-69ad9ed2e33f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="OldXiao"]--&amp;gt;This is for price sensitive application,and it is simple,nRF5 SDK is enough.[/quote]
&lt;p&gt;You can use the same old low const devices with nRF Connect SDK, and it is suitable for small devices as well as larger. That said, using the nRF5 SDK is possible, just be aware that it has not been updated for a long time and you should not expect any updates going forward either.&lt;/p&gt;
[quote user="OldXiao"]Could you explain how to realize it?[/quote]
&lt;p&gt;I dot not have any IR examples, but PWM sequences are demonstrated in the &lt;a href="https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/pwm_hw_example.html"&gt;PWM driver sample&lt;/a&gt;&amp;nbsp;(there very short sequences are used, but the principel is the same with longer sequences).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on interrupt process in nRF52840</title><link>https://devzone.nordicsemi.com/thread/524813?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2025 13:18:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f96f6f7b-e16c-4cc9-b631-c3c578ea18d7</guid><dc:creator>OldXiao</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for reply.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;I would like to re-iterate that using the SoftDevice and nRF5 SDK for new products is not recomended. The nRF Connect SDK is the SDK that we support going forward.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;--&amp;gt;This is for price sensitive application,and it is simple,nRF5 SDK is enough.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;If it is easier to do it in software and it does not take too long compared to the Bluetooth acticity, an option can be to use the&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/sds_s140/page/SDS/s1xx/concurrent_multiprotocol_tsl_api/radio_tsl_api.html"&gt;radio timeslot API&lt;/a&gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;--&amp;gt;If 20 central connections reached, I think the timeslot maybe is not so much(though I do not think about it yet), the time to send a IR packet will be about 1.2ms + 450us/bit * 32bit = 15.6ms.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;Another alternative coudl be to have the whole sequence in RAM, as the PWM peripheral can output sequences from RAM.&amp;nbsp;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;--&amp;gt;I hope I can do like this,but,as I said before,I don&amp;#39;t figure it out.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you explain how to realize it?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The work flow will looks like this:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;typedef struct{
	uint16_t tick;
	bool     PWM_ON;
}IR_bit_t;
IR_bit_t ir_data[33];//preamble + 32 bits
uint16_t current_ir_data_index = 0;

void send_ir_data(IR_bit_t* data,uint16_t* idx){
	if(*idx &amp;gt;= 33) return;
	
	timer_B.ticks = (*(data+*idx)).tick;
	if((*(data+*idx)).PWM_ON)
		timer_A.start;
	else{
		timer_A.stop;
		Pin_PWM.level = LOW;
	}	
	
	(*idx)++;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I know I can use DMA to transfer the ticks to timer_B register,but I don&amp;#39;t know how to switch the PWM ON/OFF.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have no experience on using PPI + GPIOE + EVENT + ...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So,till now,I have no idea to solve it.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on interrupt process in nRF52840</title><link>https://devzone.nordicsemi.com/thread/524804?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2025 12:16:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c8c1855-90c7-4e71-9133-7623babb447c</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Another alternative coudl be to have the whole sequence in RAM, as the PWM peripheral can output sequences from RAM. If it is easier to do it in software and it does not take too long compared to the Bluetooth acticity, an option can be to use the &lt;a href="https://docs.nordicsemi.com/bundle/sds_s140/page/SDS/s1xx/concurrent_multiprotocol_tsl_api/radio_tsl_api.html"&gt;radio timeslot API&lt;/a&gt;. With this, you can get a duration of time where you are guaranteed to not be interrupted by the SoftDevice.&lt;/p&gt;
&lt;p&gt;PS: I would like to re-iterate that using the SoftDevice and nRF5 SDK for new products is not recomended. The nRF Connect SDK is the SDK that we support going forward.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on interrupt process in nRF52840</title><link>https://devzone.nordicsemi.com/thread/524772?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2025 09:34:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68cb5c33-2b84-44af-b879-5452dc0f2016</guid><dc:creator>OldXiao</dc:creator><description>&lt;p&gt;Einar:&lt;/p&gt;
&lt;p&gt;I have read&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/sds_s140/page/SDS/s1xx/processor_avail_interrupt_latency/processor_avail_interrupt_latency.html"&gt;Interrupt model and processor availability&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;To tell the truth, I&amp;#39;m not clear with model very much,I&amp;#39;m still doubt on the possibility on my case:&lt;/p&gt;
&lt;p&gt;I need to send 32 bits through IR with PWM.&lt;/p&gt;
&lt;p&gt;PWM Freq = 40K&lt;/p&gt;
&lt;p&gt;bit 1 : 600us PWM + 300us space/silence&lt;/p&gt;
&lt;p&gt;bit 0 : 300us PWM + 300us&amp;nbsp;&lt;span&gt;space/silence&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;preamble : 1200us PWM + 300us&amp;nbsp;&lt;span&gt;space/silence&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The solution&amp;nbsp;I&amp;nbsp;adoped&amp;nbsp;using normal ARM MCU:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1) use timer_A to output 40K PWM;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2) use timer_B to control the output time(1200us/600us/300us) and switch on/off PWM output;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3) the timer ticks computed before send, and timer_B interrupt handler will load the ticks and switch on/off PWM.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Acoodring to&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/sds_s140/page/SDS/s1xx/ble_processor_avail_interrupt_latency/ble_central_connection_performance.html"&gt;Bluetooth Low Energy central connection processor usage&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;21us =&amp;lt; tISR(0) &amp;lt;= 200us&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am sure the IR packet will be broken if ISR(0) triggered during it&amp;#39;s sending period.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There are 2 options for me:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1) bypass with PPI + DMA + ??&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have thought about it, but did not figure it out.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It looks like impossible to solve it only by event.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;2) detect the interruption.&lt;br /&gt;If the timer_B interrupt was interrupted,cancel current send,retry later(how to confirm no higher interrupt is processing?)&lt;/p&gt;
&lt;p&gt;Same problem when receiving IR signal,but not so serious,maybe we can use PPI to solve it.&lt;/p&gt;
&lt;p&gt;I use timer to measure the time between rise and down level on pin,maybe we can use PPI + DMA to store result to memory,and process the data in any interrupt triggered by DMA.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How about your opinions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on interrupt process in nRF52840</title><link>https://devzone.nordicsemi.com/thread/524386?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2025 14:40:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:586eb7e0-e49d-4458-8ed1-b02d25ac02dd</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]I have looked through some doc on BLE chips, most of them are dual kernal:one for layers higher,and one for RADIO phy, is nRF52840 same?[/quote]
&lt;p&gt;The nRF52840 (and all other nRF52 series devices) is a singel core device.&lt;/p&gt;
&lt;p&gt;The rest of the qustions are specific to the SoftDevice, which is used in the nRF5 SDK. I will attempt to answer them, but I would strongly advice that you use the nRF Connect SDK for new products. Please see &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-connect-sdk-and-nrf5-sdk-statement"&gt;nRF Connect SDK and nRF5 SDK statement&lt;/a&gt;.&lt;/p&gt;
[quote user=""]Can I keep some interrupt not interrupted by other interrupt, or not delay too long.[/quote]
&lt;p&gt;Yes. However, the highest priority interrupt should be reserved for the SoftDevice. See &lt;a href="https://docs.nordicsemi.com/bundle/sds_s140/page/SDS/s1xx/processor_avail_interrupt_latency/processor_avail_interrupt_latency.html"&gt;Interrupt model and processor availability&lt;/a&gt;&amp;nbsp;in the &lt;a href="https://docs.nordicsemi.com/bundle/sds_s140/page/SDS/s1xx/s140.html"&gt;S140 SoftDevice specification&lt;/a&gt; for details on this.&lt;/p&gt;
[quote user=""]3) Can I directly use interrupt handler instead of events?[/quote]
&lt;p&gt;Events from the &lt;a href="https://docs.nordicsemi.com/bundle/sds_s140/page/SDS/s1xx/overview/events_sd_to_application.html"&gt;SoftDevice are a form of software interrupts&lt;/a&gt;. For other interrupt sources, you can use them as you would on any other device.&lt;/p&gt;
[quote user=""]4) Can I freely set priorities for each interrput?[/quote]
&lt;p&gt;Yes, but make sure you reseve the highest interrupts for the SoftDevice, as mentionned earlier. In practice, I recomend you use the defines in the SDK such as&amp;nbsp;APP_IRQ_PRIORITY_HIGHEST, as defined in&amp;nbsp;components/libraries/util/app_util_platform.h to make sure you pick priorities that does not conflict with the SoftDevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>