libbsd network stack optimization tips & tricks

2019-04-24 Thread Jonathan Brandmeyer
Any good tips & tricks I should know about how to optimize the rtems-libbsd networking stack? Case: - Cortex-A9, dual-core, SMP mode, using the zynq BSP on microzed hardware. - RTEMS v5, using the libbsd networking layer. - Network is otherwise idle - Test case is a trivial program that just read(

interrupt handler

2019-04-24 Thread Jython
HI, ALL! now i use this mode for interrupt in rtems status = rtems_interrupt_handler_install( STM32F4_IRQ_USART2, "SP2", RTEMS_INTERRUPT_UNIQUE, (rtems_interrupt_handler) USART2_handler, NULL ); for usart i must to make function O0 to make it work well

Re: stm32f4 __wfi

2019-04-24 Thread Christian Mauderer
The system tick is responsible for everything timing relevant in RTEMS. So if you want to use functions like sleep or rtems_task_wake_after, you need a tick. If you don't want to use anything timing relevant, you can disable that by (I think) using CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRI

Re: stm32f4 __wfi

2019-04-24 Thread Jython
Thanks for your quick reply! the system will wake up every tick, why? does it effect the RTC wakeup? i am also debugging the rtc wakeup, have posted a mail https://lists.rtems.org/pipermail/users/2019-April/033176.html On Wed, Apr 24, 2019 at 4:48 PM Christian Mauderer < christian.maude...@embedde

Re: stm32f4 __wfi

2019-04-24 Thread Christian Mauderer
There is the wfi in the Idle body. So as soon as all your tasks are sleeping (via sleep(), rtems_task_wake_after(), waiting for some signals or similar functions) wfi will be called. Note that there most likely is a lot of potential in the drivers to save power. Also note that the system will wake

Re: stm32f4 __wfi

2019-04-24 Thread Jython
i searched it by add -i 56794:d040 <_CPU_Thread_Idle_body>: 56795-#ifdef ARM_MULTILIB_HAS_WFI 56796- 56797:void *_CPU_Thread_Idle_body( uintptr_t ignored ) 56798-{ 56799- while ( true ) { 56800-__asm__ volatile ("wfi"); 56801-d040:bf30 wfi 56802- } 56803:d042:e7f

Re: stm32f4 __wfi

2019-04-24 Thread Christian Mauderer
For some reason your grep hasn't found the _CPU_Thread_Idle_body. It's possible that the stm32f4 uses some other function for that also I don't know why. For example for the xilinx_zynq_a9_qemu BSP the disassembled idle body looks like follows: void *_CPU_Thread_Idle_body( uintptr_t ignored ) {

Re: stm32f4 __wfi

2019-04-24 Thread Jython
arm-rtems4.11-objdump -dS hello.exe | grep idle --color=auto -n -B 5 -A 12 there is no idle function which calls wfi command // log 508- 509- 510- 511-} 512- 513:if((*USART2_SR) & (1<<4)) // idle 514- 3aa:4b13 ldrr3, [pc, #76]; (3f8 ) 515- 3ac:681b

stm32f4 wakeup interrupt

2019-04-24 Thread Jython
HI, ALL! why the code stuck in wakeup handler while the RTC gets time work fine i have checked some days, but no register error found, i suspect that the handler function is the issue // code rtems_isr rtc_wakeup_handler(rtems_vector_number vector) { uint32_t STM32F4_RTC_ISR = (*(volatile ui