[M0]

超低功耗Mcu PT32L007 测试板免费领

[复制链接]
744|18
手机看帖
扫描二维码
随时随地手机跟帖
rickluo|  楼主 | 2024-2-27 11:15 | 显示全部楼层
参考手册,见附件文档,

PRM0008 PT32x007x参考手册1.1.zip

6.17 MB

使用特权

评论回复
rickluo|  楼主 | 2024-2-27 11:17 | 显示全部楼层
测试板原理图,见附件


PT32L007X_TSSOP20原理图.zip

51.93 KB

使用特权

评论回复
rickluo|  楼主 | 2024-2-27 11:20 | 显示全部楼层
DSC_2270修.jpg

使用特权

评论回复
wzjhuohua| | 2024-2-28 08:28 | 显示全部楼层
有啥特色没有??

使用特权

评论回复
qintian0303| | 2024-2-28 08:37 | 显示全部楼层
引脚好少啊

使用特权

评论回复
rickluo|  楼主 | 2024-2-28 08:50 | 显示全部楼层
wzjhuohua 发表于 2024-2-28 08:28
有啥特色没有??

超低功耗,flash  64K  ram 16K

使用特权

评论回复
rickluo|  楼主 | 2024-2-28 08:51 | 显示全部楼层

是的,针对小引脚,多引脚的有PT32L076,PT32L076xx是基于Cortex-M0内核的一款32位高性能MCU,最高主频支持64MHz,Flash 64/128Kbyte, RAM 16/32Kbyte, 支持工作电压1.8~5.5v, 工作温度为-40~+105度。支持外部4~25MHz高速晶体振荡器及32.768KHz低速晶体振荡器,支持内部32MHz高速RC振荡器及32K/38.4K低速RC振荡器,支持PLL倍频。内部集成了6通道DMA控制器,4路 UART,2路LPUART,2路SPI,2路I2C等丰富的串口外设,12位1M采样率的SARADC,支持26个外部通道,多达11个定时器,其中包括1 个 16 位带死区控制和紧急刹车,用于电机控制的高级控制定时器 TIM1,1 个 16 位用于辅助电机控制的高级控制定时器 TIM8,3个16位通用定时器TIM5/6/7, 2个16位基本定时器TIM2/3, 1个16位低功耗定时器TIM4,1个可用于低功耗下电机控制TIM10,1个独立看门狗1个窗口看门狗。支持液晶显示LCD接口,其中包括2*42、4*40、6*38及8*36等,支持7位DAC,4路比较器,4路运算放大器。部分IO大电流驱动功能。支持Sleep模式和Deep Sleep模式。支持AES128/192/256, 乘法器&除法器,低电压检测功能,看门狗唤醒,芯片内部唯一码,CRC校验等功能。

使用特权

评论回复
xch| | 2024-2-28 12:12 | 显示全部楼层
看起来没低功耗 lpuart,没有异步工作的低功耗 timer ,但是为啥叫超低功耗?

使用特权

评论回复
wangxiangtan2| | 2024-2-29 08:34 | 显示全部楼层
怎么领,在哪儿领老哥

使用特权

评论回复
rickluo|  楼主 | 2024-2-29 09:09 | 显示全部楼层
可以的,发我地址,我快递给您,运费到付

使用特权

评论回复
rickluo|  楼主 | 2024-2-29 09:09 | 显示全部楼层
wzjhuohua 发表于 2024-2-28 08:28
有啥特色没有??

大众化才是最好的,

使用特权

评论回复
rickluo|  楼主 | 2024-2-29 09:10 | 显示全部楼层
xch 发表于 2024-2-28 12:12
看起来没低功耗 lpuart,没有异步工作的低功耗 timer ,但是为啥叫超低功耗? ...

详细数据手册,请查收!

PT32L007x数据手册1.1.pdf

2.88 MB

使用特权

评论回复
gyh974| | 2024-2-29 10:28 | 显示全部楼层
什么内核?

使用特权

评论回复
804879880| | 2024-2-29 11:07 | 显示全部楼层
有MCU具体需求的可联系 可联系电话15332235813;微信号:daishishuai3。

使用特权

评论回复
rickluo|  楼主 | 2024-2-29 11:54 | 显示全部楼层

M0内核

使用特权

评论回复
rickluo|  楼主 | 2024-2-29 11:57 | 显示全部楼层
wangxiangtan2 发表于 2024-2-29 08:34
怎么领,在哪儿领老哥

TEL/VX:18566239000

使用特权

评论回复
rickluo|  楼主 | 2024-3-1 10:32 | 显示全部楼层
微信图片_20240301103158.jpg

渠道多多,多多关注

使用特权

评论回复
rickluo|  楼主 | 2024-3-25 14:41 | 显示全部楼层
  /******************************************************************************
  * @file    PT32x007x_uart.c
  * @author  应用开发团队
  * @version V1.5.0
  * @date    2023/11/20
  * @brief    This file provides firmware functions to manage the following
  *          functionalities of the Universal synchronous asynchronous receiver
  *          transmitter (USART):
  *           + Initialization and Configuration
  *           + STOP Mode
  *           + BaudRate
  *           + Data transfers
  *           + Multi-Processor Communication
  *           + Half-duplex mode
  *           + Smartcard mode
  *           + Interrupts and flags management
  *            
  ******************************************************************************
  * @attention
  *
  *
  *****************************************************************************/


/* Includes ------------------------------------------------------------------*/
#include "PT32x007x_uart.h"


/** @defgroup UART
  * @brief UART driver modules
  * @{
  */

/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/\
#define Init_CR_MASK        (u32)0xFFFFFE80
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/


/**
  * @brief  Initializes the UARTx peripheral according to the specified
  *         parameters in the USART_InitStruct .
  * @param  UARTx: where x can be from 0 to 1 to select the UART peripheral.
  * @param  UART_InitStruct: pointer to a UART_InitTypeDef structure that contains
  *         the configuration information for the specified UART peripheral.
  * @retval None
  */
void UART_Init(UART_TypeDef* UARTx, UART_InitTypeDef* UART_InitStruct)
{
        u32  tmpreg = 0, remainder = 0,quotient = 0, pclk = 0;
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_UART_BaudRate(UART_InitStruct->UART_BaudRate));
        assert_param(IS_UART_WordLengthAndParity(UART_InitStruct->UART_WordLengthAndParity));
        assert_param(IS_UART_StopBitLength(UART_InitStruct->UART_StopBitLength));
        assert_param(IS_UART_ParityMode(UART_InitStruct->UART_ParityMode));
        assert_param(IS_UART_Receiver(UART_InitStruct->UART_Receiver));
   assert_param(IS_UART_LoopbackMode(UART_InitStruct->UART_LoopbackMode));
        UARTx->RXFR = UART_RXFR_RXFR;
        UARTx->TXFR = UART_TXFR_TXFR;
       
        tmpreg &= Init_CR_MASK;
        tmpreg |=  (UART_InitStruct ->UART_WordLengthAndParity  | \
                                                        UART_InitStruct ->UART_StopBitLength        | \
                                                        UART_InitStruct ->UART_ParityMode           | \
                                                        UART_InitStruct->UART_LoopbackMode          | \
                                                        UART_InitStruct->UART_Receiver);
        UARTx->CR = tmpreg;
       
        pclk = RCC_GetClockFreq(RCC_PCLK);
   
        quotient =  (pclk / (16 * UART_InitStruct->UART_BaudRate));
  remainder = (pclk % (16 * UART_InitStruct->UART_BaudRate));
  if(quotient==0)
        {
                UARTx->BRR=1;
        }
        else
        {
                if (remainder > (8 * UART_InitStruct->UART_BaudRate))
                {
                        UARTx->BRR = (u16) (quotient + 1);         
                }
                else
                {
                        UARTx->BRR = (u16) quotient;        
                }
        }
}

/**
  * @brief  Fills each UART_InitStruct member with its default value.
  * @param  UART_InitStruct: pointer to a UART_InitTypeDef structure
  *         which will be initialized.
  * @retval None
  */
void UART_StructInit(UART_InitTypeDef* UART_InitStruct)
{
        /* USART_InitStruct members default value */
        UART_InitStruct->UART_BaudRate = 19200;
        UART_InitStruct->UART_WordLengthAndParity = UART_WordLengthAndParity_8DP;
        UART_InitStruct->UART_StopBitLength = UART_StopBitLength_1;
        UART_InitStruct->UART_ParityMode = UART_ParityMode_Odd;
        UART_InitStruct->UART_Receiver = UART_Receiver_Enable;
        UART_InitStruct->UART_LoopbackMode = UART_LoopbackMode_Disable;
}

/**
  * @brief  Enables or disables the specified UART peripheral.
  * @param  UARTx: where x can be from 0 to 1 to select the UART peripheral.
  * @param  NewState: new state of the USARTx peripheral.
  *          This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void UART_Cmd(UART_TypeDef* UARTx, FunctionalState NewState)
{
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_FUNCTIONAL_STATE(NewState));
        if (NewState != DISABLE)
        {
                /* Enable the selected USART by setting the UE bit in the CR1 register */
                UARTx->CR |= UART_CR_EN;
        }
        else
        {
                /* Disable the selected USART by clearing the UE bit in the CR1 register */
                UARTx->CR &= (~UART_CR_EN);
        }
}

/**
  * @brief  Transmits single data through the UARTx peripheral.
  * @param  UARTx: where x can be from 0 or 1 to select the UART peripheral.
  * @param  Data: the data to transmit.
  * @retval None
  */
void UART_SendData(UART_TypeDef* UARTx, u16 Data)
{
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_UART_DATA(Data));
        /* While the TxFIFO contain 8 characters. */
        while((UARTx->SR & UART_SR_TXF));
        /* Transmit Data */
        UARTx->DR = (Data & (u16)0x01FF);
}

/**
  * @brief  Returns the most recent received data by the UARTx peripheral.
  * @param  UARTx: where x can be from 0 to 1 to select the UART peripheral.
  * @retval The received data.
  */
u16 UART_ReceiveData(UART_TypeDef* UARTx)
{
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        /* Receive Data */
        return (u16)(UARTx->DR & (u16)0x01FF);
}

/**
  * @brief  This function reset the Rx and the Tx FIFOs
  * @param  UARTx: where x can be from 0 to 1 to select the UART peripheral.
  * @param  FIFO: Transmit FIFO or receive FIFO for the UART .
  *          This parameter can be:
  *            @ARG Rx_FIFO: Receive FIFO .
  *            @arg Tx_FIFO: Transmit FIFO .
  * @retval None.
  */
void UART_FifoReset(UART_TypeDef* UARTx, u8 UART_FIFO)
{
  assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_UART_FIFO(UART_FIFO));
        switch (UART_FIFO)
        {
                case FIFO_RX :
                        UARTx->RXFR = UART_RXFR_RXFR;
                        break;
                case FIFO_TX :
                        UARTx->TXFR = UART_TXFR_TXFR;
                        break;
        }
}

/**
  * @brief  Enables or disables the UART's Half Duplex communication.
  * @param  UARTx: where x can be from 0 to 1 to select the UART peripheral.
  * @param  NewState: new state of the UART Communication.
  *          This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void UART_HalfDuplexCmd(UART_TypeDef* UARTx, FunctionalState NewState)
{
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_FUNCTIONAL_STATE(NewState));
        if (NewState != DISABLE)
        {
                /* Enable the Half-Duplex mode by setting the OWE bit in the CR register */
                UARTx->CR |= UART_CR_SLME;
        }
        else
        {
                /* Disable the Half-Duplex mode by clearing the OWE bit in the CR register */
                UARTx->CR  &= (u32)~((u32)UART_CR_SLME);
        }
}

/**
  * @brief  Enables or disables the UART's transmitter or receiver.
  * @param  UARTx: where x can be from 0 to 1 to select the UART peripheral.
  * @param  UART_Direction: specifies the UART direction.
  *          This parameter can be any combination of the following values:
  *            @arg UART_SingleLineDirection_Tx: UART Single Line Direction Transmitter
  *            @arg UART_SingleLineDirection_Rx: UART Single Line Direction Receiver
  * @param  NewState: new state of the USART transfer direction.
  *          This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void UART_HalfDuplexDirectionConfig(UART_TypeDef* UARTx, u32 Direction)
{
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_UART_SingleLineDirection(Direction));
        if (Direction != UART_SingleLineDirection_Rx)
        {
                /* Set NSS pin internally by software */
                UARTx->CR |= UART_SingleLineDirection_Tx;
        }
        else
        {
                /* Reset NSS pin internally by software */
                UARTx->CR &= ~UART_SingleLineDirection_Tx;
        }
}

/**
  * @brief  Enables or disables the UART's IrDA interface.
  * @param  UARTx: where x can be 0 to select the UART peripheral.
  * @param  NewState: new state of the IrDA mode.
  *          This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void UART_IrDACmd(UART_TypeDef* UARTx, FunctionalState NewState)
{
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_FUNCTIONAL_STATE(NewState));
        if (NewState != DISABLE)
        {
                /* Enable the IrDA mode by setting the IRE bit in the IMCR register */
                UARTx->IMCR |= UART_IMCR_IRE;
        }
        else
        {
                /* Disable the IrDA mode by clearing the EN bit in the IMCR register */
                UARTx->IMCR &= ~UART_IMCR_IRE;
        }
}

/**
  * @brief  Configures the IrDA's Pin polarity
  * @param  UARTx: where x can be 0 to select the UART peripheral.
  * @param  NewState: new defined levels for the USART data.
  *          This parameter can be:
  *            @arg ENABLE: pin(s) signal values are inverted (Vdd =0, Gnd =1).
  *            @arg pin(s) signal works using the standard logic levels (Vdd =1, Gnd =0).
  * @NOTE   This function has to be called before calling UART_Cmd() function.
  * @retval None
  */
void UART_IrDAPolarityConfig(UART_TypeDef* UARTx, FunctionalState NewState)
{
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_FUNCTIONAL_STATE(NewState));
        if (NewState != DISABLE)
        {
                /* Enable the binary data inversion feature by setting the DATAINV bit in
                   the CR2 register */
                UARTx->IMCR |= UART_IMCR_IRPN;
        }
        else
        {
                /* Disable the binary data inversion feature by clearing the DATAINV bit in
                   the CR2 register */
                UARTx->IMCR &= ~UART_IMCR_IRPN;
        }
}

/**
  * @brief  Sets the infrared duty cycle for UART peripheral.
  * @param  UARTx: where x can be 0 to select the UART peripheral.
  * @param  IrDADutyCycle: specifies the infrared duty cycle.
  * @note   This function has to be called before calling UART_Cmd() function.
  * @retval None
  */
void UART_IrDADutyCycleConfig(UART_TypeDef* UARTx, u16 IrDADutyCycle)
{
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_UART_InfraredDutyCycle(IrDADutyCycle));
        /* Clear the IrDA's modulation PWM duty cycle */
        UARTx->IMDCR &= ~UART_IMDCR_DUTY;
        /* Set the IrDA's modulation PWM duty cycle*/
        UARTx->IMDCR |= IrDADutyCycle;
}

/**
  * @brief  Enables or disables the specified USART interrupts.
  * @param  UARTx: where x can be from 1 to 8 to select the USART peripheral.
  * @param  UART_IT: specifies the UART interrupt sources to be enabled or disabled.
  *          This parameter can be one of the following values:
  *            @arg UART_IT_RXNEI: specifies the interrupt source for Receiver FIFO buffer non-empty interrupt.
  *            @arg UART_IT_RXFI: specifies the interrupt source for Receiver FIFO buffer full interrupt.
  *            @arg UART_IT_PEI: specifies the interrupt source for Parity error interrupt.
  *            @arg UART_IT_FEI: specifies the interrupt source for Frame error interrupt.
  *            @arg UART_IT_OVRI: specifies the interrupt source for Receiver FIFO buffer overflow interrupt.
  *            @arg UART_IT_TXEI: specifies the interrupt source for Transmitter FIFO buffer empty interrupt.
  *            @arg UART_IT_TXFI: specifies the interrupt source for Transmitter FIFO buffer full interrupt.
  *            @arg UART_IT_TXOI: specifies the interrupt source for Transfer end interrupt
  * @param  NewState: new state of the specified USARTx interrupts.
  *          This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void UART_ITConfig(UART_TypeDef* UARTx, u32 UART_IT, FunctionalState NewState)
{
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_UART_IT(UART_IT));
        assert_param(IS_FUNCTIONAL_STATE(NewState));
        if (NewState != DISABLE)
        {
                UARTx->IE |= UART_IT;
        }
        else
        {
                UARTx->IE &= ~UART_IT;
        }
}

/**
  * @brief  Checks whether the specified UART flag is set or not.
  * @param  UARTx: where x can be from 0 to 1 to select the UART peripheral.
  * @param  UART_FLAG: specifies the flag to check.
  *          This parameter can be one of the following values:
  *            @arg UART_FLAG_RXNE: Receiver FIFO not empty flag.
  *            @arg UART_FLAG_RXF: Receiver FIFO full flag.
  *            @arg UART_FLAG_PE: Parity error flag.
  *            @arg UART_FLAG_FE: Frame error flag.
  *            @arg UART_FLAG_OVR: Receiver FIFO buffer overflow flag.
  *            @arg UART_FLAG_TXE: Transmitter FIFO empty flag.
  *            @arg UART_FLAG_TXF: Transmitter FIFO full flag.
  *            @arg UART_FLAG_TXO: Transfer end flag.
  * @retval The new state of UART_FLAG (SET or RESET).
  */
FlagStatus UART_GetFlagStatus(UART_TypeDef* UARTx, u32 UART_FLAG)
{
        FlagStatus bitstatus = RESET;
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_UART_FLAG(UART_FLAG));
        if ((UARTx->SR & UART_FLAG) != (u16)RESET)
        {
                bitstatus = SET;
        }
        else
        {
                bitstatus = RESET;
        }
        return bitstatus;
}

/**
  * @brief  Clears the UARTx's pending flags.
  * @param  UARTx: where x can be from 0 to 1 to select the USART peripheral.
  * @param  USART_FLAG: specifies the flag to clear.
  *          This parameter can be any combination of the following values:
  *            @arg UART_FLAG_PE: Parity error flag.
  *            @arg UART_FLAG_FE: Frame error flag.
  *            @arg UART_FLAG_OVR: Receiver FIFO buffer overflow flag.
  * @retval None
  */
void UART_ClearFlag(UART_TypeDef* UARTx, u32 UART_FLAG)
{
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_UART_FLAG(UART_FLAG));
        if(UART_FLAG==UART_FLAG_PE || UART_FLAG==UART_FLAG_FE || UART_FLAG==UART_FLAG_OVR)
        {
                UARTx->SR = UART_FLAG;
        }
}

/**
  * @brief  Checks whether the specified UART intterrupt status is set or not.
  * @param  UARTx: where x can be from 0 to 1 to select the USART peripheral.
  * @param  UART_IT: Specify the intterrupt status to be checked.
  *         This parameter can be one of the following values:
        *            @arg UART_IT_RXNEI: specifies the interrupt source for Receiver FIFO buffer non-empty interrupt.
  *            @arg UART_IT_RXFI: specifies the interrupt source for Receiver FIFO buffer full interrupt.
  *            @arg UART_IT_PEI: specifies the interrupt source for Parity error interrupt.
  *            @arg UART_IT_FEI: specifies the interrupt source for Frame error interrupt.
  *            @arg UART_IT_OVRI: specifies the interrupt source for Receiver FIFO buffer overflow interrupt.
  *            @arg UART_IT_TXEI: specifies the interrupt source for Transmitter FIFO buffer empty interrupt.
  *            @arg UART_IT_TXFI: specifies the interrupt source for Transmitter FIFO buffer full interrupt.
  *            @arg UART_IT_TXOI: specifies the interrupt source for Transfer completed interrupt
  * @return ITStatus of UART_IT (SET or RESET).
  */
ITStatus UART_GetITStatus(UART_TypeDef* UARTx, u32 UART_IT)
{
        ITStatus bitstatus = RESET;
        u32 enablestatus = 0;
        /* Check the parameters */
        assert_param(IS_UART_ALL_PERIPH(UARTx));
        assert_param(IS_UART_IT(UART_IT));
        /**/
        enablestatus = (u32)(UARTx->IE & UART_IT);
        /*  */
        if (((u32)(UARTx->SR & UART_IT) != (u32)RESET) && (enablestatus != (u32)RESET))
        {
                /* */
                bitstatus = SET;
        }
        else
        {
                /* */
                bitstatus = RESET;
        }
        /**/
        return  bitstatus;
}

/**
  * @}
  */


使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

59

主题

425

帖子

4

粉丝