New HAL v 0.6.0 for W806 for Arduino platform (part 2) #15
Replies: 40 comments 272 replies
-
Добавил все Ваши измения по I2c, слил на гитхаб. Вроде ничего не упустил. |
Beta Was this translation helpful? Give feedback.
-
Начал работать с SPI - для начала "на авось" попытался запустить свой SPI дисплей с вашим примером.
Точнее CS понятен, а с двумя другими сомнения. У меня на дисплее есть пины "DC/RS" и "RESET". Какой из них соответвует пину "А0" в примере? |
Beta Was this translation helpful? Give feedback.
-
Привет Дмитрий! ЗЫ. А новая сборка будет? :) И галочку SPI наверное можно поставить... |
Beta Was this translation helpful? Give feedback.
-
Я отделил наш репозиторий от китайского прародителя :) |
Beta Was this translation helpful? Give feedback.
-
Выпустил новый релиз версия 0.0.3. Можно обновить прямо из Боард Менеджера. |
Beta Was this translation helpful? Give feedback.
-
Александр, добрый день! Решил написать краткие памятки для каждого пункта списка, где мы галочки ставим. И еще вопрос - на каждом ШИМ канале мы можем использовать одновременно только один пин, или можно и несколько, но парметры сигнала у них будут общими? |
Beta Was this translation helpful? Give feedback.
-
Дмитрий, а у нас по дефолту какой режим SPI? NSS_Soft или NSS_Hard? Что то у меня пример не заводится :) В примере ST7735_HardSPI.ino надо строку инициализации заменит на эту В общем, этот пример придется , наверное, немного переписать/причесать с учетом разрядности MCU и заодно данные из даташита в памяти освежить :) |
Beta Was this translation helpful? Give feedback.
-
Привет Выкладываю перевод раздела 23 даташита (описание регистров PWM) . (Замечание к файлу - в принципе, большая часть там понятна, несмотря на местами кривой перевод. А остальное надо пробовать на железе, чтобы понять, что же китайцы имели в виду. Например это относится к режиму захвата и его прерываниям (разделы 23.4.10 и 11). Например, что такое "Rising edge delay interrupt flags overrun status" - что-то тут намешано всего, и delay и flag и overrun... - каша какая-то. |
Beta Was this translation helpful? Give feedback.
-
Касательно Вашего замечания насчет SPIClass и совместимости с Ардуино. Как раз на минувшей неделе столкнулся с тем, что поддержка этого SPIClass в ядре АВР чисто номинальная. Даже инициализировать свой экземпляр обьекта SPIClass и то проблема - все методы чисто виртуальные. Нам надо будет написать это как-то более прилично :) Так же в продолжение темы про PWM - я там выше выкладывал Вам перевод описания регистров из даташита. Сегодня попробовал некоторые режимы. Ну, с OneShotMode все понятно - запускаешь ШИМ, он выдает единичный импульс заданной частоты и скважности и останавливается. При этом все настройки ШИМ сохраняются, для нового импульса достаточно дать только PWM_Start, ничего настраивать не надо. Можно, вроде настроить прерывание по концу цикла, но до этого пока не добрался. Непонятно только, зачем китайцы сделали фактически два дублирующий друг друга режима - ведь OneShotMode и многократные импульсы со счетчиком =1 - это абсолютно один и тот же режим. |
Beta Was this translation helpful? Give feedback.
-
Давайте разберем логику событий. Мне кажется что мы получаем deadlock/клинч/зависание из за неправильной обработки масок прерываний. Смотрите, перед запуском пользовательского обработчика прерывания отрабатывает макрос |
Beta Was this translation helpful? Give feedback.
-
Действительно...! Вы правы :) Поменял приоритеты - все заработало. Однако, у меня разрыв шаблона. Причем здесь приоритеты, если при входе в обработчик, прерывания периферийного таймера запрещаются? |
Beta Was this translation helpful? Give feedback.
-
Не вполне Вас понимаю. При входе в какой обработчик прерывания какого таймера запрещаются? |
Beta Was this translation helpful? Give feedback.
-
Ну, тогда мне казалось, что есть способ лучше :)
Это, в смысле, не использовать задержку в прерывании? :) С этим я не спорю, но ситуации когда короткие задержки в прерывании нужны - тоже бывают. Анатолий, можно вас попросить переписать delayMicroseconds() на NOP-ах? - Вы же вроде пробовали ВиннерМикровский ассемблер. |
Beta Was this translation helpful? Give feedback.
-
Это не имеет никакого отношения к проблеме конфликта прерываний от двух РАЗНЫХ таймеров, как мне кажется |
Beta Was this translation helpful? Give feedback.
-
Анатолий, вопросик к Вам как знатоку ХАЛа. |
Beta Was this translation helpful? Give feedback.
-
ФастЛЕД с оговоркой :) - пока только 2811/2812 ленты поддерживаются, а синтаксисе настроек Фастлед для разных лент не разобрался еще. |
Beta Was this translation helpful? Give feedback.
-
А почему просто не добавитьь в начале скетча
Результат, мне кажется, будет ровно тем же. |
Beta Was this translation helpful? Give feedback.
-
Анатолий, помните я спрашивал про глобальное отключение прерываний?
и соответвующую ей __enable_irq() |
Beta Was this translation helpful? Give feedback.
-
Анатолий, как Вы себя чувствуете? |
Beta Was this translation helpful? Give feedback.
-
lcd 1602 без i2c есть. Смогу проверить в воскресенье. А он не говорил как подсоединился? Какие ноги и куда задействовал? |
Beta Was this translation helpful? Give feedback.
-
А что там с LVGL ? Она вроде на ЕСП32 работает, значит можно попробовать портировать... |
Beta Was this translation helpful? Give feedback.
-
Привет! Небольшая косметика по горячим следам. Tested! Там есть нюанс в определении размера кучи. По дефолту установлено 2 мегабайта, видимо для W861 |
Beta Was this translation helpful? Give feedback.
-
Дмитрий, приветствую!
Зразу заливайте в основную ветку. Там проверять нечего по большому счету... три строчки на С |
Beta Was this translation helpful? Give feedback.
-
Все нормально. Можно заливать |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Привет! Натолкнулся на странное поведение... |
Beta Was this translation helpful? Give feedback.
-
Дмитрий привет! Более-менее причесал Схемы на W802 в DOC W802_mainboard.pdf Есть ли смысл под эту плату городить папку в variant? По назначению пинов это тоже самое что и w801. ЗЫ. Придется делать свой variant. На этой плате недоступны выводы для ExtFlash и psram |
Beta Was this translation helpful? Give feedback.
-
Какие нюансы? |
Beta Was this translation helpful? Give feedback.
-
Привет! Родилась идея :) Можно подружить плату W806 с WiFi модулем с SDIO интерфейсом. Я потихоньку разбираюсь с F133 чипом на плате вот отсюда https://aliexpress.ru/item/1005005927716994.html?sku_id=12000034886620617&spm=a2g2w.productlist.search_results.2.5f932b04SRYgTI |
Beta Was this translation helpful? Give feedback.
-
Привет! Я там в issue добавил проблему с решением. |
Beta Was this translation helpful? Give feedback.
-
Продолжаем здесь :)
В старой ветке файл hardware.zip с последними правками по i2c. Не пропустите
Но я еще эту тему попозже поковыряю отчасти i2c. Вейн из WinnerMicro прислал кое что по софтверной реализации на уровне HAL, посмотрим смогу ли я обернуть это в существующий класс SoftwareI2C и что там нового.
Beta Was this translation helpful? Give feedback.
All reactions