# SAMD support working

**URL:** https://community.simplefoc.com/t/samd-support-working/492
**Category:** Uncategorized
**Created:** [January 26, 2021, 8:14pm UTC](https://community.simplefoc.com/t/samd-support-working/492 "2021-01-26T20:14:39Z")
**Posts on this page:** 5
**Page:** 4

<div class="post-metadata">

### Author: ![malem](https://community.simplefoc.com/user_avatar/community.simplefoc.com/malem/32/1169_2.png) [@malem](https://community.simplefoc.com/u/malem)
#### Post date: [May 21, 2021, 11:52pm UTC](https://community.simplefoc.com/t/samd-support-working/492/61 "2021-05-21T23:52:35Z")

</div>

Hmm maybe it’s all working so well that I’m systematically sampling during the low phase of the pwm?

---

<div class="post-metadata">

### Author: ![runger](https://community.simplefoc.com/user_avatar/community.simplefoc.com/runger/32/395_2.png) [@runger](https://community.simplefoc.com/u/runger)
#### Post date: [May 22, 2021, 12:14am UTC](https://community.simplefoc.com/t/samd-support-working/492/62 "2021-05-22T00:14:30Z")

</div>

I’ll try to see if I can run it this weekend. It sounds like you made awesome progress!

---

<div class="post-metadata">

### Author: ![malem](https://community.simplefoc.com/user_avatar/community.simplefoc.com/malem/32/1169_2.png) [@malem](https://community.simplefoc.com/u/malem)
#### Post date: [May 22, 2021, 12:15am UTC](https://community.simplefoc.com/t/samd-support-working/492/63 "2021-05-22T00:15:47Z")

</div>

I still cannot think of a solution to problem 2… where i was going with that was to input scan the whole adc pin range at each event, current code does not do that

---

<div class="post-metadata">

### Author: ![malem](https://community.simplefoc.com/user_avatar/community.simplefoc.com/malem/32/1169_2.png) [@malem](https://community.simplefoc.com/u/malem)
#### Post date: [May 22, 2021, 4:22am UTC](https://community.simplefoc.com/t/samd-support-working/492/64 "2021-05-22T04:22:11Z")

</div>

Oh i may have an idea:

Enavle ovfeo on tcc0 → triggers adc conv on channel A  
… In ADC\_handler(), read the result, switch muxpos to channel B and enable tcc1 ovfeo → triggers adc conv on channel B  
… In ADC\_handler, etc…

---

<div class="post-metadata">

### Author: ![malem](https://community.simplefoc.com/user_avatar/community.simplefoc.com/malem/32/1169_2.png) [@malem](https://community.simplefoc.com/u/malem)
#### Post date: [May 22, 2021, 8:55pm UTC](https://community.simplefoc.com/t/samd-support-working/492/65 "2021-05-22T20:55:16Z")

</div>

Before I went threre I managed to find out why I have always reading 1.71V

First, I forgot to load the factory calibration. with that I’m back at 1.69

@runger Please make sure you use the version I just pushed if you happend to find the time to check.

Second, it was as I suspected, I was reading during the pwm dead time. using `TCC_WAVEB_WAVEGENB_DSTOP` instead of `TCC_WAVEB_WAVEGENB_DSBOTTOM`  
solved it!  
this is when I forfce my motor left and right.

 ![Screenshot_right](https://community.simplefoc.com/uploads/default/original/2X/8/8f260df6690374851febd70b4aeb71ce7ad5cbe8.png)  
 ![Screenshot_left](https://community.simplefoc.com/uploads/default/original/2X/8/861bded3cd98986977373cbc319e17b9dfea94ea.png)

[Previous page](https://community.simplefoc.com/t/samd-support-working/492.md?page=3)
