GithubHelp home page GithubHelp logo

niekiran / masteringmcu Goto Github PK

View Code? Open in Web Editor NEW
364.0 364.0 372.0 39.45 MB

Udemy Mastering Microcontroller Course Repository

C 93.42% C++ 0.32% Makefile 1.64% Assembly 3.28% HTML 1.32% Scala 0.02%

masteringmcu's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

masteringmcu's Issues

GPIO driver code jumbled up and unnecessarily invoking trigger

The tutorial shows it correctly, but the committed code has issues. I was confused by this mismatch while comparing the code. This is as shown in the tutorial:

/*********************************************************
 * @fn		- GPIO_IRQHandling
 * @brief		- Interrupt handling
 *
 * @param[in]	-
 * @param[in]	-
 *
 * @return		- 
 *
 * @notes		-
 * /
void GPIO_IRQHandling(uint8_t PinNumber)
{
 //clear the EXTIPR register
	if(EXTI ->PR |= (1 << PinNumber))
	{
		//clear
		EXTI ->PR &= ~(1 << PinNumber);
	}
}

how do i clone

I am at lesson 3 and it said to clone?

I do not know hoe to find your respond to this so pleas explain tis also?

This is my email [email protected] explain how to find your response to this.

Thank you,
ฦ’g

stm32f407xx_gpio_driver.c -> GPIO_Init Suggestion

In my microcontroller the pins are started by default as an analog mode (to save energy), so it would be interesting to ensure that the pin is configured as an input before starting the interrupt configuration process.

Just by adding this line:

//Configure GPIO as input
pGPIOHandle->pGPIOx->MODER &= ~( 0x3 << (2 * pGPIOHandle->GPIO_PinConfig.GPIO_PinNumber));

SPI baud rate prescaler issue

For example, below evaluates to 0x18
#define SPI_REG_CR1_BR_PCLK_DIV_16 ( ( uint32_t) 3 << 3 )

and in hal, we have error check condition which checks 0x18> 7 sets default CR1 with 0.
if(pre_scalar_value > 7 )
SPIx->CR1 |= (0x00 << 3); //if pre_scalar_value > 7,then use default . that is 0

In order to fix, it is just enough to have below change
#define SPI_REG_CR1_BR_PCLK_DIV_16 3

Passing SPI handle to to SPI interrupt

I don't understand how the SPI handle is passed to the SPI interrupt. Relevant lines in code
file: stm32f407xx_spi_driver.c

void SPI_IRQHandling(SPI_Handle_t *pHandle)
{

	uint8_t temp1 , temp2;
	//first lets check for TXE
	temp1 = pHandle->pSPIx->SR & ( 1 << SPI_SR_TXE);
	temp2 = pHandle->pSPIx->CR2 & ( 1 << SPI_CR2_TXEIE);

	if( temp1 && temp2)
	{
		//handle TXE
		spi_txe_interrupt_handle(pHandle);
	}

	// check for RXNE
	temp1 = pHandle->pSPIx->SR & ( 1 << SPI_SR_RXNE);
	temp2 = pHandle->pSPIx->CR2 & ( 1 << SPI_CR2_RXNEIE);

	if( temp1 && temp2)
	{
		//handle RXNE
		spi_rxne_interrupt_handle(pHandle);
	}

	// check for ovr flag
	temp1 = pHandle->pSPIx->SR & ( 1 << SPI_SR_OVR);
	temp2 = pHandle->pSPIx->CR2 & ( 1 << SPI_CR2_ERRIE);

	if( temp1 && temp2)
	{
		//handle ovr error
		spi_ovr_err_interrupt_handle(pHandle);
	}


}

I'm architecting a similar application and need to pass SPI information from various applications. I'm using a different controller (dsPIC33). I do not understand how the different SPI handles declared in my application is passed to the interrupt context.

Interfacing with GSM Module

I am trying to interface GSM with STM32L151, Can you please suggest me how to send AT commands to GSM Module.
Thank you.

USART_driver.c IRQ Config

in line 566 else if(IRQNumber >= 6 && IRQNumber < 96 ) should be else if(IRQNumber >= 64 && IRQNumber < 96 )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.