資源簡介
STM32F103移植freemodbus主機協議實現modbus主機功能,程序有點小問題,讀取從機的時候出錯概率高一點,并且波特率必須是115200,否則程序會卡死,僅供參考
代碼片段和文件信息
/**************************************************************************//**
?*?@file?????core_cm3.c
?*?@brief????CMSIS?Cortex-M3?Core?Peripheral?Access?layer?Source?File
?*?@version??V1.30
?*?@date?????30.?October?2009
?*
?*?@note
?*?Copyright?(C)?2009?ARM?Limited.?All?rights?reserved.
?*
?*?@par
?*?ARM?Limited?(ARM)?is?supplying?this?software?for?use?with?Cortex-M?
?*?processor?based?microcontrollers.??This?file?can?be?freely?distributed?
?*?within?development?tools?that?are?supporting?such?ARM?based?processors.?
?*
?*?@par
?*?THIS?SOFTWARE?IS?PROVIDED?“AS?IS“.??NO?WARRANTIES?WHETHER?EXPRESS?IMPLIED
?*?OR?STATUTORY?INCLUDING?BUT?NOT?LIMITED?TO?IMPLIED?WARRANTIES?OF
?*?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE?APPLY?TO?THIS?SOFTWARE.
?*?ARM?SHALL?NOT?IN?ANY?CIRCUMSTANCES?BE?LIABLE?FOR?SPECIAL?INCIDENTAL?OR
?*?CONSEQUENTIAL?DAMAGES?FOR?ANY?REASON?WHATSOEVER.
?*
?******************************************************************************/
#include?
/*?define?compiler?specific?symbols?*/
#if?defined?(?__CC_ARM???)
??#define?__ASM????????????__asm??????????????????????????????????????/*!??#define?__INLINE?????????__inline???????????????????????????????????/*!
#elif?defined?(?__ICCARM__?)
??#define?__ASM???????????__asm???????????????????????????????????????/*!??#define?__INLINE????????inline??????????????????????????????????????/*!
#elif?defined???(??__GNUC__??)
??#define?__ASM????????????__asm??????????????????????????????????????/*!??#define?__INLINE?????????inline?????????????????????????????????????/*!
#elif?defined???(??__TASKING__??)
??#define?__ASM????????????__asm??????????????????????????????????????/*!??#define?__INLINE?????????inline?????????????????????????????????????/*!
#endif
/*?###################??Compiler?specific?Intrinsics??###########################?*/
#if?defined?(?__CC_ARM???)?/*------------------RealView?Compiler?-----------------*/
/*?ARM?armcc?specific?functions?*/
/**
?*?@brief??Return?the?Process?Stack?Pointer
?*
?*?@return?ProcessStackPointer
?*
?*?Return?the?actual?process?stack?pointer
?*/
__ASM?uint32_t?__get_PSP(void)
{
??mrs?r0?psp
??bx?lr
}
/**
?*?@brief??Set?the?Process?Stack?Pointer
?*
?*?@param??topOfProcStack??Process?Stack?Pointer
?*
?*?Assign?the?value?ProcessStackPointer?to?the?MSP?
?*?(process?stack?pointer)?Cortex?processor?register
?*/
__ASM?void?__set_PSP(uint32_t?topOfProcStack)
{
??msr?psp?r0
??bx?lr
}
/**
?*?@brief??Return?the?Main?Stack?Pointer
?*
?*?@return?Main?Stack?Pointer
?*
?*?Return?the?curren
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2020-07-23?15:23??PSH車庫控制系統_V001\
?????目錄???????????0??2020-07-23?10:20??PSH車庫控制系統_V001\CORE\
?????文件???????17273??2010-06-07?10:25??PSH車庫控制系統_V001\CORE\core_cm3.c
?????文件???????85714??2011-02-09?14:59??PSH車庫控制系統_V001\CORE\core_cm3.h
?????文件???????15503??2011-03-10?10:52??PSH車庫控制系統_V001\CORE\startup_stm32f10x_hd.s
?????目錄???????????0??2020-07-23?16:12??PSH車庫控制系統_V001\FREEMODBUS\
?????目錄???????????0??2020-07-28?14:50??PSH車庫控制系統_V001\FREEMODBUS\modbus\
?????目錄???????????0??2020-07-23?16:12??PSH車庫控制系統_V001\FREEMODBUS\modbus\ascii\
?????文件???????15202??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\ascii\mbascii.c
?????文件????????2407??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\ascii\mbascii.h
?????目錄???????????0??2020-07-23?16:12??PSH車庫控制系統_V001\FREEMODBUS\modbus\functions\
?????文件????????9616??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\functions\mbfunccoils.c
?????文件???????14133??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\functions\mbfunccoils_m.c
?????文件????????1633??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\functions\mbfuncdiag.c
?????文件????????4489??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\functions\mbfuncdisc.c
?????文件????????6273??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\functions\mbfuncdisc_m.c
?????文件???????11894??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\functions\mbfuncholding.c
?????文件???????18056??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\functions\mbfuncholding_m.c
?????文件????????4716??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\functions\mbfuncinput.c
?????文件????????5900??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\functions\mbfuncinput_m.c
?????文件????????3446??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\functions\mbfuncother.c
?????文件????????4970??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\functions\mbutils.c
?????目錄???????????0??2020-07-23?19:27??PSH車庫控制系統_V001\FREEMODBUS\modbus\include\
?????文件???????19297??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\include\mb.h
?????文件???????18814??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\include\mb_m.h
?????文件????????6083??2020-07-23?19:27??PSH車庫控制系統_V001\FREEMODBUS\modbus\include\mbconfig.h
?????文件????????3701??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\include\mbfr
?????文件????????3033??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\include\mbfunc.h
?????文件????????7913??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\include\mbport.h
?????文件????????3594??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\include\mbproto.h
?????文件????????4110??2018-08-22?11:47??PSH車庫控制系統_V001\FREEMODBUS\modbus\include\mbutils.h
............此處省略512個文件信息
- 上一篇:ChangeSkin.rar
- 下一篇:屏幕錄像大師2019共享版+注冊機
評論
共有 條評論