<?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>multiple parallel pulse measurements and generation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29296/multiple-parallel-pulse-measurements-and-generation</link><description>i have a particular automotive tuning application where i have to deal with ignition and fuel injection timing (old stuff in the new e-mobility time) 
 here are some loose specs 
 a single injector has a min on time of about 1 ms at a min repetitive</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jan 2018 09:00:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29296/multiple-parallel-pulse-measurements-and-generation" /><item><title>RE: multiple parallel pulse measurements and generation</title><link>https://devzone.nordicsemi.com/thread/116534?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2018 09:00:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7289995-f5b3-4e30-a6f2-f27eab95d7a3</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Great! Good luck!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: multiple parallel pulse measurements and generation</title><link>https://devzone.nordicsemi.com/thread/116533?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2018 05:00:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edb8da36-b722-46c9-a5e3-44164c5146d8</guid><dc:creator>efiLabs</dc:creator><description>&lt;p&gt;thanks Martin ... i&amp;#39;ll keep it in mind right now ... will start to implement parts of it in the next few weeks ... just got my own nus code interface and my own adc classes to run on the 52832 as well as the 52810 ... many thanks&lt;/p&gt;
&lt;p&gt;cheers Klaus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: multiple parallel pulse measurements and generation</title><link>https://devzone.nordicsemi.com/thread/116532?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2018 13:26:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83ae2ab4-7f6c-4b3e-9472-9759416623a8</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Maybe you could also look into the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/pwm.html?cp=2_1_0_46#concept_pzc_1pw_nr"&gt;PWM module&lt;/a&gt;. The PWM on the NRF52 family is quite flexible and it is possible to set up pre defined pulse sequences and loop each sequence as many times as you want. Maybe it would be possible to configure a single pulse (with length and frequency) in a GPIO triggered interrupt and loop the PWM sequence only once, hence generating period with a duty cycle and frequency defined by you in the interrupt handler. This could possibly save you a GPIOTE output channel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: multiple parallel pulse measurements and generation</title><link>https://devzone.nordicsemi.com/thread/116531?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2018 13:26:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0dec2db-f4c7-49a9-a825-70beb9865a9a</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;If you need more than 8 GPIOTE channels you might look into using a &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/gpiote.html?cp=2_1_0_20_1#concept_jyp_21x_lr"&gt;port event&lt;/a&gt; instead of individual GPIOTE channels. Port events allow you to listen to events on multiple pins, but all events will trigger the same interrupt, so you will have to &amp;quot;manually&amp;quot; check what pin triggered the event each time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: multiple parallel pulse measurements and generation</title><link>https://devzone.nordicsemi.com/thread/116530?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2018 01:59:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12737814-359d-4c5f-9295-f2de9b2a805e</guid><dc:creator>efiLabs</dc:creator><description>&lt;p&gt;thanks Martin, this discussion helps to get more details into the design ... i also did my last injection project around 2009 and there have been many other projects of all kind since (firmware, android, QT and more) ... now back to the design :&lt;/p&gt;
&lt;p&gt;i added to my original question right below the new inj-timing jpeg and pdf and hope it all makes sense ... checked it a few times&lt;/p&gt;
&lt;p&gt;also i have no clue how to make the pics visible, other than showing the name for download&lt;/p&gt;
&lt;p&gt;now, this would eat up 2 timers with 4 cc regs each and 8 gpiote channels&lt;/p&gt;
&lt;p&gt;i don&amp;#39;t think i have any resources left for the crank sensor, which has a simpler wave form (only the leading edge counts), but the timing requirements are more critical 300 us or maybe less per crank sensor tooth tick&lt;/p&gt;
&lt;p&gt;i would need to start a single pwm pulse right at every crank tick ... the pulse on duration is not critical, just about 1/2 of the last tick to tick time ... and this for every tick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: multiple parallel pulse measurements and generation</title><link>https://devzone.nordicsemi.com/thread/116526?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2018 12:26:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2c40ff2-cf01-490e-94a2-b4fd65a30510</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;And by the way, don&amp;#39;t forget that TIMER 0 is &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/sd_resource_reqs/hw_block_interrupt_vector.html?cp=2_3_1_0_6_0"&gt;used by the Softdevice&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: multiple parallel pulse measurements and generation</title><link>https://devzone.nordicsemi.com/thread/116525?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2018 12:25:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09d1ceec-18c1-4444-b166-a964a16d4741</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Ok, I think I get it. Sounds like a challenge. So referring to your diagram,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;t-delay depends on t-period? I guess that shorter t-period -&amp;gt; shorter t-daly?&lt;/li&gt;
&lt;li&gt;Does t-on also depend on t-period?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I are some thoughts:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/sug.png" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;What kind of latencies can you tolerate?&lt;/p&gt;
&lt;p&gt;Maybe it is possible to reconfigure GPIOTE channel 0 in the interrupt and use the same channel, but a different pin and configuration, to toggle inj-out. Then you would need a second interrupt to configure the GPIOTE channel back to inj-in configuration though. If this is possible I think you can get away with a single timer and a single GPIOTE channel per injector.&lt;/p&gt;
&lt;p&gt;Since the injectors are asynchronous I&amp;#39;m pretty sure you will need a sepparate timer for each injector. No way around that I think.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: multiple parallel pulse measurements and generation</title><link>https://devzone.nordicsemi.com/thread/116529?ContentTypeID=1</link><pubDate>Tue, 16 Jan 2018 04:16:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e97e4b9e-78a3-42fa-a390-d0c10a599d88</guid><dc:creator>efiLabs</dc:creator><description>&lt;p&gt;the firmware captures injector pulses and outputs them a defined delay time later with a change in the pulse length (shorter or longer)&lt;/p&gt;
&lt;p&gt;i need to capture the leading edge of the inj pulse and the end of this pulse in &amp;quot;capture regs&amp;quot; ... now i have the pulse start time and pulse length time&lt;/p&gt;
&lt;p&gt;i need to output an inj pulse starting a defined delayed time after the leading input edge of the input pulse with a changed pulse time length calculated from the input pulse time length and some math ... and this all times 4 for individual injectors ... there is no correlation between them, they are treated individually&lt;/p&gt;
&lt;p&gt;it looks to me that i need 4 gpiote input channels for the edge detect being handed via ppi to 4 timer capture regs which eats up timer 1&lt;/p&gt;
&lt;p&gt;a capture leading edge interrupt (of some sort) provides the cpu with the pulse in start time for setting up the delayed pulse out time generated by a timer compare event setup by this isr ... the compare event via ppi will flip the leading edge of the output pulse&lt;/p&gt;
&lt;p&gt;a similar mechanism can be used for the trailing edge of the output pulse&lt;/p&gt;
&lt;p&gt;now another 4 compare regs of timer 2 are used up as well as 4 more gpiote channels are used by the injector output pulses&lt;/p&gt;
&lt;p&gt;result : timer 1 is all used up for 4 inj capture events&lt;/p&gt;
&lt;p&gt;timer 2 is all used up for 4 inj compare events&lt;/p&gt;
&lt;p&gt;4 gpiote channels are used for inj input edge detection and 4 more for inj output generation&lt;/p&gt;
&lt;p&gt;the crank sensor (only one, but faster pulses) works in a similar manner, where only the leading pulse edges need to be output with a variably time delayed ... the pulse duration can be used in a constant way&lt;/p&gt;
&lt;p&gt;well, there are 2 more timers with capture and compare support&lt;/p&gt;
&lt;p&gt;however, how do i feed them (edge detect and flipping output bits) if all 8 gpiote channels are used up&lt;/p&gt;
&lt;p&gt;i do not see a way to still serve the crank sensor delayed pulse output&lt;/p&gt;
&lt;p&gt;i have not used timer captures or gpiote or ppi channels at this time ... i&amp;#39;m still trying to find out how much functionality can be provided by the 52832 mcu&lt;/p&gt;
&lt;p&gt;a change in engine rpm will be reflected in the changing total pulse period times&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: multiple parallel pulse measurements and generation</title><link>https://devzone.nordicsemi.com/thread/116528?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2018 17:14:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46c5b4b3-34b4-4a33-8449-4421ca7795f5</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;I&amp;#39;m still not sure if I completely understand your use case. I suppose you have an engine of some sort with four cylinders. Then based on the crank position you need to time the fuel injection? And you have 4 inputs from crank position sensors and four outputs controlling fuel injection? Do you need more than 8 GPIOTE channels to control 4 output and 4 input pins?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: multiple parallel pulse measurements and generation</title><link>https://devzone.nordicsemi.com/thread/116527?ContentTypeID=1</link><pubDate>Sun, 14 Jan 2018 04:48:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:974a5d36-12d5-4b20-9a4d-82d9b2c33225</guid><dc:creator>efiLabs</dc:creator><description>&lt;p&gt;hi Martin :&lt;/p&gt;
&lt;p&gt;thanks, i have updated the questions and added an timing.pdf file&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: multiple parallel pulse measurements and generation</title><link>https://devzone.nordicsemi.com/thread/116524?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 14:26:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57525427-f0be-4a41-90b0-57427a187bf4</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure if I fully understand your use case and reasoning.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is it so that you have 4 asynchronous input signals and you need to measure frequency or ducy cycle, etc. on each signal?&lt;/li&gt;
&lt;li&gt;Do you need 4 asynchronous outputs? What kind of waveforms should these produce?&lt;/li&gt;
&lt;li&gt;Here you can see overviews over how much time the Softdevice might steal from your CPU in various roles and states: &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/processor_avail_interrupt_latency/ble_usage_patterns.html?cp=2_3_1_0_15_2_2"&gt;Bluetooth low energy processor usage patterns&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;If you are generating some sort of square waves then maybe you can use the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/pwm.html?cp=2_1_0_46#concept_pzc_1pw_nr"&gt;PWM&lt;/a&gt;?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>