Port Modbus Slave Stack On ATSAME54 embedded by neudeep - July 30, 20190 We are referring modbus server stack implementation for SAM3X and We want to port it on SAME54P20A. First we have downloaded the example project for SAME54P20A which is using Usart_Asynchrnous module from Atmel START. Then create new top level directory for project files. Following files needs modification while porting, they are present in sub directory named 'port' which will contain all port specific files, portserial.cporttimer.cportevent.cportother.cport.h Atmel start project is having makefile in sub-directory 'gcc'. Add these port specific files paths in makefile. Then add modbus stack folder to top level directory which is having all the modbus specific functions. For compilation we hav to add these all file paths in makefile which is in gcc directory. We have to first
How To Use Two Timers In Same Project embedded by blog_1buq8n - July 29, 2019August 22, 20210 If you are using SAM series controller you probably have came across this question, How do i implement two timer which generate two interrupt at different time in same project? or How we can use two timer in same project in SAME54 controller? Well SAM series controller are ARM-based MCUs and MPUs from ATMEL now Microchip. We are using ATSAME54P20A ie SAME54 explained pro board to evaluate the functionality of it. So created new project using start.atmel.com with TC0 and TC1 along with WDT and interrputs. The project tree looks as below, This project works well and TC0 timer interrupt is working but TC1 timer interrupt is not working. Following is code for initialization and using
How To Write RTOS Safe ISR For ATSAME embedded by blog_1buq8n - July 26, 2019August 22, 20210 In our application it is required to use FreeRTOS API functions from an interrupt service routine(ISR). Good thing about FreeRTOS is it has provided interrupt safe API, meaning one can use FreeRTOS API functions from ISR, as they have provided two versions of some API. Functions intended for use from ISRs have “FromISR” appended to their name eg. xQueueSendFromISR How to set correct priority levels if I want to call an ISR-safe function from interrupt? Because the maximum level of configKERNEL_INTERRUPT_PRIORITY is 1 and the minimum preemption Priority level of any interrupt source e.g. and edge interrupt is 15. That means it is above the max. level of configKERNEL_INTERRUPT_PRIORITY. In our application we were using xQueueSendFromISR() from IRQ10 ie 'EIC_10_IRQn', to
How To Use WDT On Free RTOS Running ATSAMEx embedded by blog_1buq8n - July 24, 20190 After doing some google and spending almost 4 hours on choosing right place to start WDT, we have decided to share our learning here. Well we are using ATSAME54P19/20 controller from Microchip formally Atmel. Watchdog timer - WDT works well without Free RTOS (10.0) but when WDT is enabled along with RTOS it simply does not work well. In big while(1) embedded applications with no RTOS you can always initialize WDT after peripheral initialization and feed/touch WDT in while/main loop. In case of RTOS there are multiple tasks/threads and to be specific in case for Free RTOS when you try to enable WDT right before vTaskStartScheduler(); call it simply does not work. Tried with following solutions - like configure