I have changed to the square wave. The ESP32 generates 0 and 255 values as expected. I guess they are equivalent to 0V and 3.3V (I do not have a DMM)
In the M4, I must read the values 0 (0 V) and 4096 (3.3V) However I read;
842,864,1052,906,664,828,930,664,732,922,978,976,922,840,760,832,886,946,936,919,889,911,877,911,905,841,897,879,905,865,885,909,885,931,907,897,832,870,908,881,897,867,897,865,889,919,901,833,873,911,881,899,881,906,874,900,884,930,888,923,913,897,859,887,909,879,917,897,877,905,864,906,914,641,841,875,620,712,786,907,993,1049,1005,967,905,857,889,938,942,946,948,914,864,910,884,918,898,704,644,843,1007,995,889,803,912,960,980,901,825,867,937,913,885,927,825,801,874,976,928,837,853,920,908,900,874,810,796,889,979,919,825,845,913,898,878,904,776,814,877,906,834,897,219,865,936,1102,1090,1033,931,813,736,786,820,885,961,952,937,843,865,900,866,906,882,916,890,922,886,938,912,886,928,904,873,905,877,914,896,872,904,847,881,907,877,907,877,921,897,875,909,882,890,938,916,896,864,897,872,904,872,913,877,883,931,901,877,911,882,902,896,871,907,873,882,929,939,36,872,1000,1208,983,1081,1123,1093,984,928,856,874,932,954,974,971,955,937,904,864,905,900,880,904,675,600,878,1060,979,867,781,825,974,984,906,826,876,955,937,911,896,794,771,835,916,866,818,818,861,896,858,886,825,805,890,988,944,864,884,963,962,949,940,842,889,968,961,933,916,906,896,855,904,896,795,837,864,865,932,552,849,911,911,962,905,777,716,760,864,953,979,979,952,909,879,856,921,921,912,884,914,883,913,891,936,916,866,914,888,914,875,923,905,883,911,897,866,868,912,878,914,886,928,896,875,901,885,904,864,910,877,915,889,928,898,868,905,883,907,869,909,886,920,890,928,898,878,910,896,834,872,904,906,642,836,882,643,669,748,906,968,1045,975,929,857,777,549,705,1025,1025,885,753,777,896,962,889,840,866,952,952,910,897,801,777,841,931,879,841,845,897,886,916,897,793,751,886,991,955,872,904,920,915,885,929,849,865,929,900,860,897,872,904,872,905,891,883,908,912,884,914,886,925,905,877,908,886,915,875,929,904,880,906,882,914,886,920,905,877,888,944,972,202,932,1001,1184,1140,1128,1072,938,837,827,869,947,960,980,973,942,912,883,931,906,891,955,936,911,883,912,858,896,883,920,872,923,889,929,907,884,923,897,869,897,873,865,915,898,872,896,861,883,905,884,932,905,884,897,897,866,897,865,889,915,882,910,916,880,890,938,922,898,873,855,676,707,851,973,1011,914,787,920,680,936,867,513,635,769,793,908,1008,989,971,1003,1032,905,826,869,960,971,960,946,858,864,947,961,928,882,937,930,900,868,939,874,882,952,928,896,885,914,897,874,908,897,840,861,905,875,896,860,897,859,890,933,911,876,897,880,904,881,919,897,868,897,862,886,922,867,912,897,867,889,923,897,882,917,897,872,884,902,897,870,899,866,896,859,884,913,898,865,865,906,879,911,917,716,888,960,713,750,864,1025,1057,1041,960,884,888,915,907,917,919,910,872,874,906,874,911,857,905,896,866,886,912,896,858,882,922,897,872,896,860,883,911,882,922,896,850,904,872,903,873,841,739,791,776,779,899,900,762,800,897,906,820,777,781,821,840,846,864,809,795,866,929,857,827,844,886,906,867,929,865,866,936,910,870,948,526,866,939,937,1011,970,858,822,820,880,980,1026,978,962,922,897,873,885,949,940,924,898,866,896,870,905,879,921,887,915,901,875,896,866,914,873,898,872,908,879,883,937,910,884,920,897,887,913,897,872,904,848,882,915,889,920,896,874,896,874,906,888,910,868,916,897,868,898,870,897,864,896,873,888,904,897,867,897,897,555,851,897,626,835,795,724,792,873,995,1043,995,979,941,908,884,939,897,921,911,884,913,881,911,884,923,902,882,907,873,921,896,872,903,820,780,789,776,777,757,790,800,795,814,847,851,866,878,898,880,907,849,905,873,899,866,899,857,880,907,885,914,861,915,896,864,897,858,882,906,873,925,896,847,897,865,887,909,883,913,885,929,916,897,883,611,922,936,548,727,777,769,832,945,1025,953,961,921,871,882,911,905,896,874,906,880,896,854,898,870,899,867,896,857,875,897,882,915,867,915,882,910,889,921,897,873,905,876,920,885,913,897,874,900,867,891,920,896,872,909,882,896,883,917,884,914,899,864,898,874,906,883,906,859,900,866,896,867,897,865,888,917,896,877,897,857,898,867,888,917,888,922,907,882,930,898,842,884,919,882,920,897,852,880,907,872,910,872,883,937,921,897,882,915,889,924,905,887,921,867,915,919,643,853,912,612,686,754,889,1058,1071,1033,967,921,865,884,943,939,939,925,909,878,878,928,911,896,873,906,873,912,875,899,884,899,867,920,897,859,880,904,874,904,965,912,904,808,842,878,905,857,883,921,897,867,941,953,856,840,911,914,873,875,904,897,887,914,916,844,815,873,951,929,861,876,928,931,909,906,905,787,801,867,905,832,860,744,912,946,739,801,800,952,1059,1006,937,827,825,868,923,923,940,868,844,909,919,876,896,865,918,913,873,928,887,840,906,937,913,849,860,906,898,864,915,832,789,841,914,887,875,879,914,919,897,888,932,816,858,938,937,882,891,936,937,915,911,897,782,810,879,923,859,858,888,939,911,904,897,784,810,878,917,854,857,882,928,897,888,932,810,860,943,930,883,897,882,929,900,904,827,794,840,917,897,825,817,842,873,882,937,888,849,923,955,928,869,887,939,937,923,928,856,845,922,945,906,846,920,730,889,978,768,679,761,1028,1089,1043,922,856,859,869,930,936,851,916,951,928,855,857,899,896,881,933,843,821,888,965,940,883,916,919,909,900,884,840,865,942,952,907,865,900,889,918,925,856,832,896,928,905,835,834,864,900,905,881,827,824,897,907,856,848,868,913,882,939,918,792,843,922,906,836,824,850,882,913,905,823,792,854,918,873,898,538,837,899,607,817,738,747,867,979,1034,1024,984,988,952,942,876,877,971,1043,992,950,911,906,921,915,900,816,792,850,917,873,855,865,914,896,876,928,816,827,899,906,855,837,856,898,873,918,896,770,803,882,920,842,833,857,896,864,909,835,797,855,936,907,833,827,854,896,859,905,812,782,842,911,866,843,840,882,925,906,897,819,788,848,912,857,836,845,866,938,900,897,824,784,835,897,849,818,817,851,876,888,942,897,800,864,941,904,832,835,881,929,896,896,840,797,841,917,880,866,864,909,905,881,929,917,809,876,836,940,1024,684,740,930,1024,988,978,842,778,826,896,865,879,923,912,878,888,945,899,819,883,969,937,873,901,907,905,873,916,910,792,810,888,922,850,846,882,939,917,897,899,793,779,843,905,836,814,828,865,889,921,909,845,809,864,932,898,833,851,897,875,889,936,878,846,938,950,916,865,907,901,874,904,904,832,806,866,921,875,874,908,904,883,921,909,824,808,866,922,882,882,913,911,897,876,924,841,818,880,944,906,850,880,932,914,897,889,873,850,930,952,922,866,899,889,939,880,953,897,817,897,915,872,860,882,936,928,896,897,873,802,856,938,904,833,885,746,925,949,750,754,786,975,1137,1123,1024,888,921,914,906,931,946,850,887,977,975,921,872,928,936,920,900,906,810,803,875,939,879,861,883,947,932,912,921,844,832,904,935,889,873,899,900,888,908,917,873,833,887,982,960,899,867,931,924,896,896,880,825,840,936,920,846,842,882,939,914,896,907,808,786,850,908,844,827,840,881,907,864,921,861,731,896,931,901,833,841,933,778,835,969,768,693,856,1033,993,937,817,786,802,819,843,898,897,771,746,867,897,827,817,842,876,889,904,897,902,784,793,876,931,841,821,841,883,907,864,907,912,804,809,897,880,866,849,879,931,904,867,900,923,833,805,888,961,904,839,865,916,897,852,875,946,890,846,911,952,920,865,888,954,947,916,888,961,975,865,906,960,948,897,854,912,913,883,897,873,947,851,841,929,937,884,896,874,920,888,928,883,965,923,826,900,929,885,889,923,925,915,876,832,930,947,833,865,954,942,874,888,942,947,920,898,905,915,795,796,936,648,778,794,576,640,668,768,923,937,864,909,897,801,760,840,900,900,864,907,821,771,791,865,885,864,866,921,915,885,944,880,846,914,953,921,856,864,930,931,911,915,824,794,857,922,864,856,888,944,929,930,864,825,882,974,954,896,852,920,922,929,905,769,808,877,907,828,811,843,879,933,913,770,803,865,897,825,816,832,858,908,889,811,833,921,913,840,841,869,906,913,897,754,851,936,908,834,833,858,904,916,843,779,834,915,867,841,841,887,943,957,870,835,920,960,921,853,878,940,946,961,843,837,942,969,929,865,897,896,905,898,747,737,908,971,906,800,786,812,936,916,697,643,812,899,794,699,732,818,949,1053,731,704,841,942,843,779,769,778,888,1039,699,680,840,896,811,755,814,852,938,1057,798,690,833,908,832,800,799,834,843,992,938,714,810,911,858,808,824,875,911,921,1035,801,690,842,909,818,782,811,826,809,874,1057,805,760,930,872,832,867,921,904,874,969,1089,825,777,913,896,792,794,833,843,846,850,997,944,728,837,936,883,872,896,901,873,896,858,1038
Neither 0s nor 4096s.
Approximately the ESP32 is generating a value every millisecond. The M4 is reading the values every microsecond.
Please le me know if I have a conceptual error.