Re: [PR] drivers/adc: Use mutexlock to replace critical section protection when using adc_isr_thread [nuttx]

2025-12-30 Thread via GitHub


z12 commented on PR #17708:
URL: https://github.com/apache/nuttx/pull/17708#issuecomment-3701060861

   > _Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md)._
   > 
   > ## Summary
   > The modification replaces critical section protection with mutex locks in 
ADC driver functions when CONFIG_ADC_ISR_THREAD is enabled, ensuring 
thread-safe hardware operations without unnecessarily disabling interrupts.
   > 
   > ## Impact
   > _Update this section, where applicable, on how change affects users, build 
process, hardware, documentation, security, compatibility, etc._
   > 
   > ## Testing
   > The ADC function was tested and verified to be working correctly using 
NuttX's built-in adc_drivers.(apps/examples/adc) Test Results: Test results: 
When you input `adc -p` in the nsh terminal, the pin corresponding to channel 
adc0 is shown below.
   > 
   > ```
   > [core2] adc -p
   > [core2] adc_main:g_adcstate.count: 3
   > [core2] adc_main: Hardware initialized. Opening the ADC device: /dev/adc0
   > [core2] Sample:
   > [core2] 1: channel: 32 value: 986
   > [core2] 2: channel: 34 value: 933
   > ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] drivers/adc: Use mutexlock to replace critical section protection when using adc_isr_thread [nuttx]

2025-12-30 Thread via GitHub


z12 closed pull request #17708: drivers/adc: Use mutexlock to replace 
critical section protection when using adc_isr_thread
URL: https://github.com/apache/nuttx/pull/17708


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] drivers/adc: Use mutexlock to replace critical section protection when using adc_isr_thread [nuttx]

2025-12-30 Thread via GitHub


michallenc commented on PR #17708:
URL: https://github.com/apache/nuttx/pull/17708#issuecomment-3699453051

   Commit title is too long to pass CI.
   
   ```
   00bb46c0f9 drivers/adc: Use mutexlock to replace critical section protection 
when using adc_isr_thread
   ../nuttx/tools/checkpatch.sh -c -u -m -g 
6addf24fa2d567560ca3bd394eebe8596304e509..HEAD
   ❌ Commit subject too long > 80
   Used config files:
   1: .codespellrc
   Some checks failed. For contributing guidelines, see:
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] drivers/adc: Use mutexlock to replace critical section protection when using adc_isr_thread [nuttx]

2025-12-29 Thread via GitHub


z12 commented on PR #17708:
URL: https://github.com/apache/nuttx/pull/17708#issuecomment-3698435721

   > Looks good to me. Why wasn't a mutex used in the first place?
   > 
   > Can you indicate what hardware you tested on? Also, in the impact section 
maybe you could describe the speed up/impact on interrupt handling?
   
   The hardware used is FC7300, and IMPACT has been updated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] drivers/adc: Use mutexlock to replace critical section protection when using adc_isr_thread [nuttx]

2025-12-29 Thread via GitHub


linguini1 commented on PR #17708:
URL: https://github.com/apache/nuttx/pull/17708#issuecomment-3697193685

   Looks good to me. Why wasn't a mutex used in the first place?
   
   Can you indicate what hardware you tested on? Also, in the impact section 
maybe you could describe the speed up/impact on interrupt handling?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] drivers/adc: Use mutexlock to replace critical section protection when using adc_isr_thread [nuttx]

2025-12-29 Thread via GitHub


z12 commented on PR #17708:
URL: https://github.com/apache/nuttx/pull/17708#issuecomment-3696314346

   > _Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md)._
   > 
   > ## Summary
   > The modification replaces critical section protection with mutex locks in 
ADC driver functions when CONFIG_ADC_ISR_THREAD is enabled, ensuring 
thread-safe hardware operations without unnecessarily disabling interrupts.
   > 
   > ## Impact
   > _Update this section, where applicable, on how change affects users, build 
process, hardware, documentation, security, compatibility, etc._
   > 
   > ## Testing
   > The ADC function was tested and verified to be working correctly using 
NuttX's built-in adc_drivers.(apps/examples/adc) Test Results: Test results: 
When you input `adc -p` in the nsh terminal, the pin corresponding to channel 
adc0 is shown below. [core2] adc -p [core2] adc_main:g_adcstate.count: 3 
[core2] adc_main: Hardware initialized. Opening the ADC device: /dev/adc0 
[core2] Sample: [core2] 1: channel: 32 value: 986 [core2] 2: channel: 34 value: 
933
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] drivers/adc: Use mutexlock to replace critical section protection when using adc_isr_thread [nuttx]

2025-12-29 Thread via GitHub


z12 closed pull request #17708: drivers/adc: Use mutexlock to replace 
critical section protection when using adc_isr_thread
URL: https://github.com/apache/nuttx/pull/17708


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] drivers/adc: Use mutexlock to replace critical section protection when using adc_isr_thread [nuttx]

2025-12-29 Thread via GitHub


z12 commented on PR #17708:
URL: https://github.com/apache/nuttx/pull/17708#issuecomment-3696221142

   > @z12 let's fix:
   > 
   > ```
   > a0ea4a16ab Merge 00bb46c0f956c8dfe77c965ef3bfc5e49b03b2ea into 
a5a29bdbbb6505bfcabec1b51ee91b35e90d33a5
   > 00bb46c0f9 drivers/adc: Use mutexlock to replace critical section 
protection when using adc_isr_thread
   > ../nuttx/tools/checkpatch.sh -c -u -m -g 
a5a29bdbbb6505bfcabec1b51ee91b35e90d33a5..HEAD
   > ❌ Commit subject too long > 
[80](https://github.com/apache/nuttx/actions/runs/20567795527/job/59076211141#step:3:81)
   > Used config files:
   > 1: .codespellrc
   > Some checks failed. For contributing guidelines, see:
   >   https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md
   > Error: Process completed with exit code 1.
   > ```
   
   done


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] drivers/adc: Use mutexlock to replace critical section protection when using adc_isr_thread [nuttx]

2025-12-29 Thread via GitHub


xiaoxiang781216 commented on PR #17708:
URL: https://github.com/apache/nuttx/pull/17708#issuecomment-3696090249

   @z12 let's fix:
   ```
   a0ea4a16ab Merge 00bb46c0f956c8dfe77c965ef3bfc5e49b03b2ea into 
a5a29bdbbb6505bfcabec1b51ee91b35e90d33a5
   00bb46c0f9 drivers/adc: Use mutexlock to replace critical section protection 
when using adc_isr_thread
   ../nuttx/tools/checkpatch.sh -c -u -m -g 
a5a29bdbbb6505bfcabec1b51ee91b35e90d33a5..HEAD
   ❌ Commit subject too long > 
[80](https://github.com/apache/nuttx/actions/runs/20567795527/job/59076211141#step:3:81)
   Used config files:
   1: .codespellrc
   Some checks failed. For contributing guidelines, see:
 https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md
   Error: Process completed with exit code 1.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]