• Pointers as arguments in function calls
    I have an interrupt service routine that uses Register Bank 2. From within the ISR I call a function, passing a pointer as the argument-- e.g. XXX is defined in a typedef struct declaration The...
  • Function with different types of arguments
    Hello! In the program, I decided to redo some of the functions and added the structure: typedef struct { GPIO_TypeDef * GPIOx; uint16_t PINx; }GPIO_PINdef; Previously, the function looked like...
  • Function argument getting modified by function
    I am passing an array to a function to sort it and return the median value. I do not want the global array to be sorted. I only want the array to be sorted within the function. I thought that when a variable...
  • Delay function takes the doubel of time
    Hello, I'm using an stm32f103C8 and trying to produce a precise delay funcion. I'm using a HSE of 72Mhz so a I supposed the clock cycle is equal to 13.8ns. The delay function is simply a while(count...
  • Take Back Half Algorithm
    Dear All I am working on a project where i need to heat a small amount of water in brass tube to precise temperature(say 50 deg +/- 0.1deg). Coil is wound over the brass tube for heating purpose...